summaryrefslogtreecommitdiff
path: root/login.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-21 09:51:36 +1100
committerDamien Miller <djm@mindrot.org>1999-12-21 09:51:36 +1100
commit368cf64d5c7cee6eb85d9240ea04ccf43273b5fc (patch)
tree19b5ce1233714df994e9e1699e791d269c577d2c /login.c
parentfdb7caf293e860fda343f9cc98ff3342ed997b73 (diff)
Made utmpx optional
Diffstat (limited to 'login.c')
-rw-r--r--login.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/login.c b/login.c
index ff4184572..e506d24ee 100644
--- a/login.c
+++ b/login.c
@@ -18,9 +18,9 @@
18 */ 18 */
19 19
20#include "includes.h" 20#include "includes.h"
21RCSID("$Id: login.c,v 1.6 1999/12/08 23:16:55 damien Exp $"); 21RCSID("$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