summaryrefslogtreecommitdiff
path: root/login.c
diff options
context:
space:
mode:
Diffstat (limited to 'login.c')
-rw-r--r--login.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/login.c b/login.c
index 80a63f3d7..5c58d814d 100644
--- a/login.c
+++ b/login.c
@@ -18,7 +18,7 @@
18 */ 18 */
19 19
20#include "includes.h" 20#include "includes.h"
21RCSID("$Id: login.c,v 1.14 1999/12/27 23:41:12 damien Exp $"); 21RCSID("$Id: login.c,v 1.15 1999/12/28 15:32:22 damien Exp $");
22 22
23#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) 23#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
24# include <utmpx.h> 24# include <utmpx.h>
@@ -141,7 +141,9 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid,
141 /* Construct an utmp/wtmp entry. */ 141 /* Construct an utmp/wtmp entry. */
142 memset(&u, 0, sizeof(u)); 142 memset(&u, 0, sizeof(u));
143 strncpy(u.ut_line, ttyname + 5, sizeof(u.ut_line)); 143 strncpy(u.ut_line, ttyname + 5, sizeof(u.ut_line));
144#if defined(HAVE_ID_IN_UTMP)
144 strncpy(u.ut_id, ttyname + 8, sizeof(u.ut_id)); 145 strncpy(u.ut_id, ttyname + 8, sizeof(u.ut_id));
146#endif /* defined(HAVE_ID_IN_UTMP) */
145 strncpy(u.ut_name, user, sizeof(u.ut_name)); 147 strncpy(u.ut_name, user, sizeof(u.ut_name));
146#if defined(HAVE_TV_IN_UTMP) 148#if defined(HAVE_TV_IN_UTMP)
147 (void)gettimeofday(&u.ut_tv, NULL); 149 (void)gettimeofday(&u.ut_tv, NULL);