diff options
Diffstat (limited to 'login.c')
-rw-r--r-- | login.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -18,9 +18,9 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include "includes.h" | 20 | #include "includes.h" |
21 | RCSID("$Id: login.c,v 1.6 1999/12/08 23:16:55 damien Exp $"); | 21 | RCSID("$Id: login.c,v 1.7 1999/12/20 22:51:36 damien Exp $"); |
22 | 22 | ||
23 | #ifdef HAVE_UTMPX_H | 23 | #if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) |
24 | # include <utmpx.h> | 24 | # include <utmpx.h> |
25 | #endif | 25 | #endif |
26 | #ifdef HAVE_UTMP_H | 26 | #ifdef HAVE_UTMP_H |
@@ -94,7 +94,7 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid, | |||
94 | /* Construct an utmp/wtmp entry. */ | 94 | /* Construct an utmp/wtmp entry. */ |
95 | memset(&u, 0, sizeof(u)); | 95 | memset(&u, 0, sizeof(u)); |
96 | strncpy(u.ut_line, ttyname + 5, sizeof(u.ut_line)); | 96 | strncpy(u.ut_line, ttyname + 5, sizeof(u.ut_line)); |
97 | #ifdef HAVE_UTMPX_H | 97 | #if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) |
98 | u.ut_tv.tv_sec = time(NULL); | 98 | u.ut_tv.tv_sec = time(NULL); |
99 | strncpy(u.ut_user, user, sizeof(u.ut_name)); | 99 | strncpy(u.ut_user, user, sizeof(u.ut_name)); |
100 | #else | 100 | #else |