summaryrefslogtreecommitdiffstats
path: root/session.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-09-04 08:45:09 +0200
committerDamien Miller <djm@mindrot.org>2002-09-04 08:45:09 +0200
commitebc230662977241a9fd9c68034de849772d39438 (patch)
tree9cb04f9853c894f86e2ec185e182460eb30d5cac /session.c
parent - stevesk@cvs.openbsd.org 2002/08/27 17:18:40 (diff)
downloadopenssh-ebc230662977241a9fd9c68034de849772d39438.tar.xz
openssh-ebc230662977241a9fd9c68034de849772d39438.zip
- 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 'session.c')
-rw-r--r--session.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/session.c b/session.c
index 0e78aca34..566bd900e 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.147 2002/08/22 21:45:41 markus Exp $");
+RCSID("$OpenBSD: session.c,v 1.148 2002/08/29 15:57:25 stevesk Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -671,8 +671,8 @@ do_pre_login(Session *s)
* the address be 0.0.0.0.
*/
memset(&from, 0, sizeof(from));
+ fromlen = sizeof(from);
if (packet_connection_is_on_socket()) {
- fromlen = sizeof(from);
if (getpeername(packet_get_connection_in(),
(struct sockaddr *) & from, &fromlen) < 0) {
debug("getpeername: %.100s", strerror(errno));
@@ -737,7 +737,7 @@ do_login(Session *s, const char *command)
record_login(pid, s->tty, pw->pw_name, pw->pw_uid,
get_remote_name_or_ip(utmp_len,
options.verify_reverse_mapping),
- (struct sockaddr *)&from);
+ (struct sockaddr *)&from, fromlen);
#ifdef USE_PAM
/*