summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-02-09 09:53:48 +1100
committerDarren Tucker <dtucker@zip.com.au>2005-02-09 09:53:48 +1100
commit96d4710e3838af8c03a55ce37913568877dd0283 (patch)
treecfa394a8c8023fb6f521411b95d35c175daa90d3
parent5b53026f719bc0b2fc13a58ea0b6a0385e373bec (diff)
- dtucker@cvs.openbsd.org 2005/02/08 22:24:57
[sshd.c] Provide reason in error message if getnameinfo fails; ok markus@
-rw-r--r--ChangeLog5
-rw-r--r--sshd.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a7351396..98cdf96aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,9 @@
15 - dtucker@cvs.openbsd.org 2005/01/30 11:18:08 15 - dtucker@cvs.openbsd.org 2005/01/30 11:18:08
16 [monitor.c] 16 [monitor.c]
17 Make code match intent; ok djm@ 17 Make code match intent; ok djm@
18 - dtucker@cvs.openbsd.org 2005/02/08 22:24:57
19 [sshd.c]
20 Provide reason in error message if getnameinfo fails; ok markus@
18 21
1920050208 2220050208
20 - (dtucker) [regress/test-exec.sh] Bug #912: Set _POSIX2_VERSION for the 23 - (dtucker) [regress/test-exec.sh] Bug #912: Set _POSIX2_VERSION for the
@@ -2104,4 +2107,4 @@
2104 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 2107 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
2105 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 2108 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
2106 2109
2107$Id: ChangeLog,v 1.3643 2005/02/08 22:52:17 dtucker Exp $ 2110$Id: ChangeLog,v 1.3644 2005/02/08 22:53:48 dtucker Exp $
diff --git a/sshd.c b/sshd.c
index 6b379521b..a5b7f1ca3 100644
--- a/sshd.c
+++ b/sshd.c
@@ -42,7 +42,7 @@
42 */ 42 */
43 43
44#include "includes.h" 44#include "includes.h"
45RCSID("$OpenBSD: sshd.c,v 1.307 2005/01/21 08:32:02 otto Exp $"); 45RCSID("$OpenBSD: sshd.c,v 1.308 2005/02/08 22:24:57 dtucker Exp $");
46 46
47#include <openssl/dh.h> 47#include <openssl/dh.h>
48#include <openssl/bn.h> 48#include <openssl/bn.h>
@@ -1268,10 +1268,12 @@ main(int ac, char **av)
1268 if (num_listen_socks >= MAX_LISTEN_SOCKS) 1268 if (num_listen_socks >= MAX_LISTEN_SOCKS)
1269 fatal("Too many listen sockets. " 1269 fatal("Too many listen sockets. "
1270 "Enlarge MAX_LISTEN_SOCKS"); 1270 "Enlarge MAX_LISTEN_SOCKS");
1271 if (getnameinfo(ai->ai_addr, ai->ai_addrlen, 1271 if ((ret = getnameinfo(ai->ai_addr, ai->ai_addrlen,
1272 ntop, sizeof(ntop), strport, sizeof(strport), 1272 ntop, sizeof(ntop), strport, sizeof(strport),
1273 NI_NUMERICHOST|NI_NUMERICSERV) != 0) { 1273 NI_NUMERICHOST|NI_NUMERICSERV)) != 0) {
1274 error("getnameinfo failed"); 1274 error("getnameinfo failed: %.100s",
1275 (ret != EAI_SYSTEM) ? gai_strerror(ret) :
1276 strerror(errno));
1275 continue; 1277 continue;
1276 } 1278 }
1277 /* Create socket for listening. */ 1279 /* Create socket for listening. */