summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--sshconnect.c10
2 files changed, 9 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 34a863b1b..c2c13aa10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
4 - stevesk@cvs.openbsd.org 2002/06/09 22:15:15 4 - stevesk@cvs.openbsd.org 2002/06/09 22:15:15
5 [ssh.1] 5 [ssh.1]
6 update for no setuid root and ssh-keysign; ok deraadt@ 6 update for no setuid root and ssh-keysign; ok deraadt@
7 - itojun@cvs.openbsd.org 2002/06/09 22:17:21
8 [sshconnect.c]
9 pass salen to sockaddr_ntop so that we are happy on linux/solaris
7 10
820020609 1120020609
9 - (bal) OpenBSD CVS Sync 12 - (bal) OpenBSD CVS Sync
@@ -869,4 +872,4 @@
869 - (stevesk) entropy.c: typo in debug message 872 - (stevesk) entropy.c: typo in debug message
870 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 873 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
871 874
872$Id: ChangeLog,v 1.2200 2002/06/11 15:45:02 mouring Exp $ 875$Id: ChangeLog,v 1.2201 2002/06/11 15:46:34 mouring Exp $
diff --git a/sshconnect.c b/sshconnect.c
index 369b31dfe..651e3fcf4 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -13,7 +13,7 @@
13 */ 13 */
14 14
15#include "includes.h" 15#include "includes.h"
16RCSID("$OpenBSD: sshconnect.c,v 1.122 2002/06/09 04:33:27 markus Exp $"); 16RCSID("$OpenBSD: sshconnect.c,v 1.123 2002/06/09 22:17:21 itojun Exp $");
17 17
18#include <openssl/bn.h> 18#include <openssl/bn.h>
19 19
@@ -44,11 +44,11 @@ extern char *__progname;
44#endif 44#endif
45 45
46static const char * 46static const char *
47sockaddr_ntop(struct sockaddr *sa) 47sockaddr_ntop(struct sockaddr *sa, socklen_t salen)
48{ 48{
49 static char addrbuf[NI_MAXHOST]; 49 static char addrbuf[NI_MAXHOST];
50 50
51 if (getnameinfo(sa, sa->sa_len, addrbuf, sizeof(addrbuf), NULL, 0, 51 if (getnameinfo(sa, salen, addrbuf, sizeof(addrbuf), NULL, 0,
52 NI_NUMERICHOST) != 0) 52 NI_NUMERICHOST) != 0)
53 fatal("sockaddr_ntop: getnameinfo NI_NUMERICHOST failed"); 53 fatal("sockaddr_ntop: getnameinfo NI_NUMERICHOST failed");
54 return addrbuf; 54 return addrbuf;
@@ -322,8 +322,8 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
322 if (errno == ECONNREFUSED) 322 if (errno == ECONNREFUSED)
323 full_failure = 0; 323 full_failure = 0;
324 log("ssh: connect to address %s port %s: %s", 324 log("ssh: connect to address %s port %s: %s",
325 sockaddr_ntop(ai->ai_addr), strport, 325 sockaddr_ntop(ai->ai_addr, ai->ai_addrlen),
326 strerror(errno)); 326 strport, strerror(errno));
327 restore_uid(); 327 restore_uid();
328 /* 328 /*
329 * Close the failed socket; there appear to 329 * Close the failed socket; there appear to