diff options
Diffstat (limited to 'login.c')
-rw-r--r-- | login.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -18,7 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include "includes.h" | 20 | #include "includes.h" |
21 | RCSID("$Id: login.c,v 1.31 2000/06/03 14:57:40 andre Exp $"); | 21 | RCSID("$Id: login.c,v 1.32 2000/06/04 17:07:49 andre Exp $"); |
22 | 22 | ||
23 | #include "loginrec.h" | 23 | #include "loginrec.h" |
24 | 24 | ||
@@ -34,8 +34,8 @@ get_last_login_time(uid_t uid, const char *logname, | |||
34 | { | 34 | { |
35 | struct logininfo li; | 35 | struct logininfo li; |
36 | 36 | ||
37 | login_getlastentry_uid(&li, uid); | 37 | login_get_lastlog(&li, uid); |
38 | strncpy(buf, li.hostname, bufsize); | 38 | strlcpy(buf, li.hostname, bufsize); |
39 | return li.tv_sec; | 39 | return li.tv_sec; |
40 | } | 40 | } |
41 | 41 | ||
@@ -51,7 +51,7 @@ record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid, | |||
51 | struct logininfo *li; | 51 | struct logininfo *li; |
52 | 52 | ||
53 | li = login_alloc_entry(pid, user, host, ttyname); | 53 | li = login_alloc_entry(pid, user, host, ttyname); |
54 | login_set_ip4(li, (struct sockaddr_in *)addr); | 54 | login_set_addr(li, addr, sizeof(struct sockaddr)); |
55 | login_login(li); | 55 | login_login(li); |
56 | login_free_entry(li); | 56 | login_free_entry(li); |
57 | } | 57 | } |