summaryrefslogtreecommitdiff
path: root/sshlogin.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshlogin.c')
-rw-r--r--sshlogin.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/sshlogin.c b/sshlogin.c
index 36b648934..e1cc4cc82 100644
--- a/sshlogin.c
+++ b/sshlogin.c
@@ -52,11 +52,11 @@ u_long
52get_last_login_time(uid_t uid, const char *logname, 52get_last_login_time(uid_t uid, const char *logname,
53 char *buf, u_int bufsize) 53 char *buf, u_int bufsize)
54{ 54{
55 struct logininfo li; 55 struct logininfo li;
56 56
57 login_get_lastlog(&li, uid); 57 login_get_lastlog(&li, uid);
58 strlcpy(buf, li.hostname, bufsize); 58 strlcpy(buf, li.hostname, bufsize);
59 return li.tv_sec; 59 return li.tv_sec;
60} 60}
61 61
62/* 62/*
@@ -67,12 +67,12 @@ void
67record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid, 67record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid,
68 const char *host, struct sockaddr * addr, socklen_t addrlen) 68 const char *host, struct sockaddr * addr, socklen_t addrlen)
69{ 69{
70 struct logininfo *li; 70 struct logininfo *li;
71 71
72 li = login_alloc_entry(pid, user, host, ttyname); 72 li = login_alloc_entry(pid, user, host, ttyname);
73 login_set_addr(li, addr, addrlen); 73 login_set_addr(li, addr, addrlen);
74 login_login(li); 74 login_login(li);
75 login_free_entry(li); 75 login_free_entry(li);
76} 76}
77 77
78#ifdef LOGIN_NEEDS_UTMPX 78#ifdef LOGIN_NEEDS_UTMPX
@@ -80,12 +80,12 @@ void
80record_utmp_only(pid_t pid, const char *ttyname, const char *user, 80record_utmp_only(pid_t pid, const char *ttyname, const char *user,
81 const char *host, struct sockaddr * addr, socklen_t addrlen) 81 const char *host, struct sockaddr * addr, socklen_t addrlen)
82{ 82{
83 struct logininfo *li; 83 struct logininfo *li;
84 84
85 li = login_alloc_entry(pid, user, host, ttyname); 85 li = login_alloc_entry(pid, user, host, ttyname);
86 login_set_addr(li, addr, addrlen); 86 login_set_addr(li, addr, addrlen);
87 login_utmp_only(li); 87 login_utmp_only(li);
88 login_free_entry(li); 88 login_free_entry(li);
89} 89}
90#endif 90#endif
91 91
@@ -93,9 +93,9 @@ record_utmp_only(pid_t pid, const char *ttyname, const char *user,
93void 93void
94record_logout(pid_t pid, const char *ttyname, const char *user) 94record_logout(pid_t pid, const char *ttyname, const char *user)
95{ 95{
96 struct logininfo *li; 96 struct logininfo *li;
97 97
98 li = login_alloc_entry(pid, user, NULL, ttyname); 98 li = login_alloc_entry(pid, user, NULL, ttyname);
99 login_logout(li); 99 login_logout(li);
100 login_free_entry(li); 100 login_free_entry(li);
101} 101}