summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--monitor.c6
-rw-r--r--session.c6
-rw-r--r--sshlogin.c4
-rw-r--r--sshlogin.h4
5 files changed, 15 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index bb0016c1..dd497ebc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,10 @@
- stevesk@cvs.openbsd.org 2002/08/27 17:18:40
[ssh_config.5]
some warning text for ForwardAgent and ForwardX11; ok markus@
+ - 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@
20020820
- OpenBSD CVS Sync
@@ -1579,4 +1583,4 @@
- (stevesk) entropy.c: typo in debug message
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
-$Id: ChangeLog,v 1.2437 2002/09/04 06:40:37 djm Exp $
+$Id: ChangeLog,v 1.2438 2002/09/04 06:45:09 djm Exp $
diff --git a/monitor.c b/monitor.c
index 8e7ccf89..e039f7a2 100644
--- a/monitor.c
+++ b/monitor.c
@@ -25,7 +25,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: monitor.c,v 1.23 2002/08/02 14:43:15 millert Exp $");
+RCSID("$OpenBSD: monitor.c,v 1.24 2002/08/29 15:57:25 stevesk Exp $");
#include <openssl/dh.h>
@@ -1002,8 +1002,8 @@ mm_record_login(Session *s, struct passwd *pw)
* 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));
@@ -1013,7 +1013,7 @@ mm_record_login(Session *s, struct passwd *pw)
/* Record that there was a login on that tty from the remote host. */
record_login(s->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);
}
static void
diff --git a/session.c b/session.c
index 0e78aca3..566bd900 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
/*
diff --git a/sshlogin.c b/sshlogin.c
index e76f9453..4cd1c005 100644
--- a/sshlogin.c
+++ b/sshlogin.c
@@ -39,7 +39,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshlogin.c,v 1.4 2002/06/23 03:30:17 deraadt Exp $");
+RCSID("$OpenBSD: sshlogin.c,v 1.5 2002/08/29 15:57:25 stevesk Exp $");
#include "loginrec.h"
@@ -65,7 +65,7 @@ get_last_login_time(uid_t uid, const char *logname,
*/
void
record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid,
- const char *host, struct sockaddr * addr)
+ const char *host, struct sockaddr * addr, socklen_t addrlen)
{
struct logininfo *li;
diff --git a/sshlogin.h b/sshlogin.h
index bd30278e..287c0d9f 100644
--- a/sshlogin.h
+++ b/sshlogin.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshlogin.h,v 1.3 2001/06/26 17:27:25 markus Exp $ */
+/* $OpenBSD: sshlogin.h,v 1.4 2002/08/29 15:57:25 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -16,7 +16,7 @@
void
record_login(pid_t, const char *, const char *, uid_t,
- const char *, struct sockaddr *);
+ const char *, struct sockaddr *, socklen_t);
void record_logout(pid_t, const char *, const char *);
u_long get_last_login_time(uid_t, const char *, char *, u_int);