diff options
author | Damien Miller <djm@mindrot.org> | 2002-09-04 16:45:09 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2002-09-04 16:45:09 +1000 |
commit | ebc230662977241a9fd9c68034de849772d39438 (patch) | |
tree | 9cb04f9853c894f86e2ec185e182460eb30d5cac /monitor.c | |
parent | af65304a3c99a9a68d507ce0aefd2e7983eb396b (diff) |
- stevesk@cvs.openbsd.org 2002/08/29 15:57:25
[monitor.c session.c sshlogin.c sshlogin.h]
pass addrlen with sockaddr *; from Hajimu UMEMOTO <ume@FreeBSD.org>
NOTE: there are also p-specific parts to this patch. ok markus@
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "includes.h" | 27 | #include "includes.h" |
28 | RCSID("$OpenBSD: monitor.c,v 1.23 2002/08/02 14:43:15 millert Exp $"); | 28 | RCSID("$OpenBSD: monitor.c,v 1.24 2002/08/29 15:57:25 stevesk Exp $"); |
29 | 29 | ||
30 | #include <openssl/dh.h> | 30 | #include <openssl/dh.h> |
31 | 31 | ||
@@ -1002,8 +1002,8 @@ mm_record_login(Session *s, struct passwd *pw) | |||
1002 | * the address be 0.0.0.0. | 1002 | * the address be 0.0.0.0. |
1003 | */ | 1003 | */ |
1004 | memset(&from, 0, sizeof(from)); | 1004 | memset(&from, 0, sizeof(from)); |
1005 | fromlen = sizeof(from); | ||
1005 | if (packet_connection_is_on_socket()) { | 1006 | if (packet_connection_is_on_socket()) { |
1006 | fromlen = sizeof(from); | ||
1007 | if (getpeername(packet_get_connection_in(), | 1007 | if (getpeername(packet_get_connection_in(), |
1008 | (struct sockaddr *) & from, &fromlen) < 0) { | 1008 | (struct sockaddr *) & from, &fromlen) < 0) { |
1009 | debug("getpeername: %.100s", strerror(errno)); | 1009 | debug("getpeername: %.100s", strerror(errno)); |
@@ -1013,7 +1013,7 @@ mm_record_login(Session *s, struct passwd *pw) | |||
1013 | /* Record that there was a login on that tty from the remote host. */ | 1013 | /* Record that there was a login on that tty from the remote host. */ |
1014 | record_login(s->pid, s->tty, pw->pw_name, pw->pw_uid, | 1014 | record_login(s->pid, s->tty, pw->pw_name, pw->pw_uid, |
1015 | get_remote_name_or_ip(utmp_len, options.verify_reverse_mapping), | 1015 | get_remote_name_or_ip(utmp_len, options.verify_reverse_mapping), |
1016 | (struct sockaddr *)&from); | 1016 | (struct sockaddr *)&from, fromlen); |
1017 | } | 1017 | } |
1018 | 1018 | ||
1019 | static void | 1019 | static void |