summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorKevin Steves <stevesk@pobox.com>2003-01-01 23:43:55 +0000
committerKevin Steves <stevesk@pobox.com>2003-01-01 23:43:55 +0000
commit678ee51ff3493f0185dcb23bfb9fb2ba299d89b1 (patch)
tree75cf1d0971f4c774f60b7d0eeb3583c6a567f35f /session.c
parent1b96cfb97585459bbb71198123425f7e831e2845 (diff)
- (stevesk) [session.c sshlogin.c sshlogin.h] complete portable
parts of pass addrlen with sockaddr * fix. from Hajimu UMEMOTO <ume@FreeBSD.org>
Diffstat (limited to 'session.c')
-rw-r--r--session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/session.c b/session.c
index dfff9c6b..90d59513 100644
--- a/session.c
+++ b/session.c
@@ -689,7 +689,7 @@ do_pre_login(Session *s)
record_utmp_only(pid, s->tty, s->pw->pw_name,
get_remote_name_or_ip(utmp_len, options.verify_reverse_mapping),
- (struct sockaddr *)&from);
+ (struct sockaddr *)&from, fromlen);
}
#endif
@@ -730,8 +730,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));