diff options
author | Damien Miller <djm@mindrot.org> | 2006-03-15 12:04:36 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2006-03-15 12:04:36 +1100 |
commit | b24c2f8e33781be43702d8cfc69d4fbd0547e638 (patch) | |
tree | dfe40e177a22098ffe48fa50eb782ef2bd244935 /sshd.c | |
parent | 2ecb6bd95d1f7d47d6071614be99339b290771e0 (diff) |
- 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@
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -42,7 +42,7 @@ | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include "includes.h" | 44 | #include "includes.h" |
45 | RCSID("$OpenBSD: sshd.c,v 1.323 2006/02/20 17:19:54 stevesk Exp $"); | 45 | RCSID("$OpenBSD: sshd.c,v 1.325 2006/03/13 08:16:00 djm Exp $"); |
46 | 46 | ||
47 | #include <sys/types.h> | 47 | #include <sys/types.h> |
48 | #ifdef HAVE_SYS_STAT_H | 48 | #ifdef HAVE_SYS_STAT_H |
@@ -1333,10 +1333,10 @@ main(int ac, char **av) | |||
1333 | num_listen_socks++; | 1333 | num_listen_socks++; |
1334 | 1334 | ||
1335 | /* Start listening on the port. */ | 1335 | /* Start listening on the port. */ |
1336 | logit("Server listening on %s port %s.", ntop, strport); | ||
1337 | if (listen(listen_sock, SSH_LISTEN_BACKLOG) < 0) | 1336 | if (listen(listen_sock, SSH_LISTEN_BACKLOG) < 0) |
1338 | fatal("listen: %.100s", strerror(errno)); | 1337 | fatal("listen on [%s]:%s: %.100s", |
1339 | 1338 | ntop, strport, strerror(errno)); | |
1339 | logit("Server listening on %s port %s.", ntop, strport); | ||
1340 | } | 1340 | } |
1341 | freeaddrinfo(options.listen_addrs); | 1341 | freeaddrinfo(options.listen_addrs); |
1342 | 1342 | ||