From b24c2f8e33781be43702d8cfc69d4fbd0547e638 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 15 Mar 2006 12:04:36 +1100 Subject: - djm@cvs.openbsd.org 2006/03/13 08:16:00 [sshd.c] don't log that we are listening on a socket before the listen() call actually succeeds, bz #1162 reported by Senthil Kumar; ok dtucker@ --- sshd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sshd.c') diff --git a/sshd.c b/sshd.c index 40593ee2e..19c2d96ad 100644 --- a/sshd.c +++ b/sshd.c @@ -42,7 +42,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.323 2006/02/20 17:19:54 stevesk Exp $"); +RCSID("$OpenBSD: sshd.c,v 1.325 2006/03/13 08:16:00 djm Exp $"); #include #ifdef HAVE_SYS_STAT_H @@ -1333,10 +1333,10 @@ main(int ac, char **av) num_listen_socks++; /* Start listening on the port. */ - logit("Server listening on %s port %s.", ntop, strport); if (listen(listen_sock, SSH_LISTEN_BACKLOG) < 0) - fatal("listen: %.100s", strerror(errno)); - + fatal("listen on [%s]:%s: %.100s", + ntop, strport, strerror(errno)); + logit("Server listening on %s port %s.", ntop, strport); } freeaddrinfo(options.listen_addrs); -- cgit v1.2.3