summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/session.c
diff options
context:
space:
mode:
authorKevin Steves <stevesk@cvs.openbsd.org>2002-08-29 15:57:26 +0000
committerKevin Steves <stevesk@cvs.openbsd.org>2002-08-29 15:57:26 +0000
commit9ecbedf1c5f75dfb13f767122db82e46bc61c811 (patch)
treef02998f219a0da6a2783b305efaceb86b7d998bb /usr.bin/ssh/session.c
parent38cd9549ee028d678964014c56d5b95a1efc10a7 (diff)
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 'usr.bin/ssh/session.c')
-rw-r--r--usr.bin/ssh/session.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c
index b628daca748..fb0df415c65 100644
--- a/usr.bin/ssh/session.c
+++ b/usr.bin/ssh/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"
@@ -647,8 +647,8 @@ do_login(Session *s, const char *command)
* 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));
@@ -661,7 +661,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);
if (check_quietlogin(s, command))
return;