[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@
This commit is contained in:
Damien Miller 2002-09-04 16:45:09 +10:00
parent af65304a3c
commit ebc2306629
5 changed files with 15 additions and 11 deletions

View File

@ -38,6 +38,10 @@
- stevesk@cvs.openbsd.org 2002/08/27 17:18:40 - stevesk@cvs.openbsd.org 2002/08/27 17:18:40
[ssh_config.5] [ssh_config.5]
some warning text for ForwardAgent and ForwardX11; ok markus@ 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 20020820
- OpenBSD CVS Sync - OpenBSD CVS Sync
@ -1579,4 +1583,4 @@
- (stevesk) entropy.c: typo in debug message - (stevesk) entropy.c: typo in debug message
- (djm) ssh-keygen -i needs seeded RNG; report from markus@ - (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 $

View File

@ -25,7 +25,7 @@
*/ */
#include "includes.h" #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> #include <openssl/dh.h>
@ -1002,8 +1002,8 @@ mm_record_login(Session *s, struct passwd *pw)
* the address be 0.0.0.0. * the address be 0.0.0.0.
*/ */
memset(&from, 0, sizeof(from)); memset(&from, 0, sizeof(from));
fromlen = sizeof(from);
if (packet_connection_is_on_socket()) { if (packet_connection_is_on_socket()) {
fromlen = sizeof(from);
if (getpeername(packet_get_connection_in(), if (getpeername(packet_get_connection_in(),
(struct sockaddr *) & from, &fromlen) < 0) { (struct sockaddr *) & from, &fromlen) < 0) {
debug("getpeername: %.100s", strerror(errno)); 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 that there was a login on that tty from the remote host. */
record_login(s->pid, s->tty, pw->pw_name, pw->pw_uid, record_login(s->pid, s->tty, pw->pw_name, pw->pw_uid,
get_remote_name_or_ip(utmp_len, options.verify_reverse_mapping), get_remote_name_or_ip(utmp_len, options.verify_reverse_mapping),
(struct sockaddr *)&from); (struct sockaddr *)&from, fromlen);
} }
static void static void

View File

@ -33,7 +33,7 @@
*/ */
#include "includes.h" #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 "ssh.h"
#include "ssh1.h" #include "ssh1.h"
@ -671,8 +671,8 @@ do_pre_login(Session *s)
* the address be 0.0.0.0. * the address be 0.0.0.0.
*/ */
memset(&from, 0, sizeof(from)); memset(&from, 0, sizeof(from));
fromlen = sizeof(from);
if (packet_connection_is_on_socket()) { if (packet_connection_is_on_socket()) {
fromlen = sizeof(from);
if (getpeername(packet_get_connection_in(), if (getpeername(packet_get_connection_in(),
(struct sockaddr *) & from, &fromlen) < 0) { (struct sockaddr *) & from, &fromlen) < 0) {
debug("getpeername: %.100s", strerror(errno)); 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, record_login(pid, s->tty, pw->pw_name, pw->pw_uid,
get_remote_name_or_ip(utmp_len, get_remote_name_or_ip(utmp_len,
options.verify_reverse_mapping), options.verify_reverse_mapping),
(struct sockaddr *)&from); (struct sockaddr *)&from, fromlen);
#ifdef USE_PAM #ifdef USE_PAM
/* /*

View File

@ -39,7 +39,7 @@
*/ */
#include "includes.h" #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" #include "loginrec.h"
@ -65,7 +65,7 @@ get_last_login_time(uid_t uid, const char *logname,
*/ */
void void
record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid, 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; struct logininfo *li;

View File

@ -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> * Author: Tatu Ylonen <ylo@cs.hut.fi>
@ -16,7 +16,7 @@
void void
record_login(pid_t, const char *, const char *, uid_t, 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 *); void record_logout(pid_t, const char *, const char *);
u_long get_last_login_time(uid_t, const char *, char *, u_int); u_long get_last_login_time(uid_t, const char *, char *, u_int);