summaryrefslogtreecommitdiff
path: root/login.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-29 02:32:22 +1100
committerDamien Miller <djm@mindrot.org>1999-12-29 02:32:22 +1100
commit9550a76c3716acc1a591dd9604cbc958a92ad891 (patch)
tree39968e63afca468fc699f9629a16868b015394a4 /login.c
parent74d0d4a3d9157823fda11c892c6d592562486b84 (diff)
- Applied another NetBSD portability patch from David Rankin
<drankin@bohemians.lexington.ky.us> - Fix --with-default-path option.
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);