- (stevesk) [session.c sshlogin.c sshlogin.h] complete portable
parts of pass addrlen with sockaddr * fix. from Hajimu UMEMOTO <ume@FreeBSD.org>
This commit is contained in:
parent
1b96cfb975
commit
678ee51ff3
|
@ -1,3 +1,8 @@
|
|||
20030101
|
||||
- (stevesk) [session.c sshlogin.c sshlogin.h] complete portable
|
||||
parts of pass addrlen with sockaddr * fix.
|
||||
from Hajimu UMEMOTO <ume@FreeBSD.org>
|
||||
|
||||
20021222
|
||||
- (bal) OpenBSD CVS Sync
|
||||
- fgsch@cvs.openbsd.org 2002/11/15 10:03:09
|
||||
|
@ -912,4 +917,4 @@
|
|||
save auth method before monitor_reset_key_state(); bugzilla bug #284;
|
||||
ok provos@
|
||||
|
||||
$Id: ChangeLog,v 1.2536 2002/12/23 02:58:17 mouring Exp $
|
||||
$Id: ChangeLog,v 1.2537 2003/01/01 23:43:55 stevesk Exp $
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -70,7 +70,7 @@ record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid,
|
|||
struct logininfo *li;
|
||||
|
||||
li = login_alloc_entry(pid, user, host, ttyname);
|
||||
login_set_addr(li, addr, sizeof(struct sockaddr));
|
||||
login_set_addr(li, addr, addrlen);
|
||||
login_login(li);
|
||||
login_free_entry(li);
|
||||
}
|
||||
|
@ -78,12 +78,12 @@ record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid,
|
|||
#ifdef LOGIN_NEEDS_UTMPX
|
||||
void
|
||||
record_utmp_only(pid_t pid, const char *ttyname, const char *user,
|
||||
const char *host, struct sockaddr * addr)
|
||||
const char *host, struct sockaddr * addr, socklen_t addrlen)
|
||||
{
|
||||
struct logininfo *li;
|
||||
|
||||
li = login_alloc_entry(pid, user, host, ttyname);
|
||||
login_set_addr(li, addr, sizeof(struct sockaddr));
|
||||
login_set_addr(li, addr, addrlen);
|
||||
login_utmp_only(li);
|
||||
login_free_entry(li);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ u_long get_last_login_time(uid_t, const char *, char *, u_int);
|
|||
|
||||
#ifdef LOGIN_NEEDS_UTMPX
|
||||
void record_utmp_only(pid_t, const char *, const char *, const char *,
|
||||
struct sockaddr *);
|
||||
struct sockaddr *, socklen_t);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue