mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-11 12:44:40 +00:00
- (bal) KNF our sshlogin.c even if the code looks nothing like upstream
code due to diversity issues.
This commit is contained in:
parent
124055dd3b
commit
78ffe26501
@ -1,3 +1,7 @@
|
|||||||
|
20040226
|
||||||
|
- (bal) KNF our sshlogin.c even if the code looks nothing like upstream
|
||||||
|
code due to diversity issues.
|
||||||
|
|
||||||
20040225
|
20040225
|
||||||
- (djm) Trim ChangeLog
|
- (djm) Trim ChangeLog
|
||||||
- (djm) Don't specify path to PAM modules in Redhat sshd.pam; from Fedora
|
- (djm) Don't specify path to PAM modules in Redhat sshd.pam; from Fedora
|
||||||
@ -798,4 +802,4 @@
|
|||||||
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
||||||
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.3259 2004/02/24 23:57:45 djm Exp $
|
$Id: ChangeLog,v 1.3260 2004/02/27 03:01:19 mouring Exp $
|
||||||
|
36
sshlogin.c
36
sshlogin.c
@ -52,11 +52,11 @@ u_long
|
|||||||
get_last_login_time(uid_t uid, const char *logname,
|
get_last_login_time(uid_t uid, const char *logname,
|
||||||
char *buf, u_int bufsize)
|
char *buf, u_int bufsize)
|
||||||
{
|
{
|
||||||
struct logininfo li;
|
struct logininfo li;
|
||||||
|
|
||||||
login_get_lastlog(&li, uid);
|
login_get_lastlog(&li, uid);
|
||||||
strlcpy(buf, li.hostname, bufsize);
|
strlcpy(buf, li.hostname, bufsize);
|
||||||
return li.tv_sec;
|
return li.tv_sec;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -67,12 +67,12 @@ 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, socklen_t addrlen)
|
const char *host, struct sockaddr * addr, socklen_t addrlen)
|
||||||
{
|
{
|
||||||
struct logininfo *li;
|
struct logininfo *li;
|
||||||
|
|
||||||
li = login_alloc_entry(pid, user, host, ttyname);
|
li = login_alloc_entry(pid, user, host, ttyname);
|
||||||
login_set_addr(li, addr, addrlen);
|
login_set_addr(li, addr, addrlen);
|
||||||
login_login(li);
|
login_login(li);
|
||||||
login_free_entry(li);
|
login_free_entry(li);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LOGIN_NEEDS_UTMPX
|
#ifdef LOGIN_NEEDS_UTMPX
|
||||||
@ -80,12 +80,12 @@ void
|
|||||||
record_utmp_only(pid_t pid, const char *ttyname, const char *user,
|
record_utmp_only(pid_t pid, const char *ttyname, const char *user,
|
||||||
const char *host, struct sockaddr * addr, socklen_t addrlen)
|
const char *host, struct sockaddr * addr, socklen_t addrlen)
|
||||||
{
|
{
|
||||||
struct logininfo *li;
|
struct logininfo *li;
|
||||||
|
|
||||||
li = login_alloc_entry(pid, user, host, ttyname);
|
li = login_alloc_entry(pid, user, host, ttyname);
|
||||||
login_set_addr(li, addr, addrlen);
|
login_set_addr(li, addr, addrlen);
|
||||||
login_utmp_only(li);
|
login_utmp_only(li);
|
||||||
login_free_entry(li);
|
login_free_entry(li);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -93,9 +93,9 @@ record_utmp_only(pid_t pid, const char *ttyname, const char *user,
|
|||||||
void
|
void
|
||||||
record_logout(pid_t pid, const char *ttyname, const char *user)
|
record_logout(pid_t pid, const char *ttyname, const char *user)
|
||||||
{
|
{
|
||||||
struct logininfo *li;
|
struct logininfo *li;
|
||||||
|
|
||||||
li = login_alloc_entry(pid, user, NULL, ttyname);
|
li = login_alloc_entry(pid, user, NULL, ttyname);
|
||||||
login_logout(li);
|
login_logout(li);
|
||||||
login_free_entry(li);
|
login_free_entry(li);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user