summaryrefslogtreecommitdiff
path: root/login.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-05-01 22:53:53 +1000
committerDamien Miller <djm@mindrot.org>2000-05-01 22:53:53 +1000
commit0e489dc5aed9d54ce1943e6bde26f1d22ac13ded (patch)
treecc401bf2ad4d1b2bd970ea3fdbf8c2459f60f808 /login.c
parent35dabd0398dc4aa8735d5ec896ead6955b83b2ff (diff)
- Merged bsd-login ttyslot and AIX utmp patch from Gert Doering
<gd@hilb1.medat.de>
Diffstat (limited to 'login.c')
-rw-r--r--login.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/login.c b/login.c
index de2c89cba..660eb6705 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.24 2000/04/19 21:42:22 damien Exp $"); 21RCSID("$Id: login.c,v 1.25 2000/05/01 12:53:53 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>
@@ -155,7 +155,11 @@ record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid,
155 memset(&u, 0, sizeof(u)); 155 memset(&u, 0, sizeof(u));
156 strncpy(u.ut_line, ttyname + 5, sizeof(u.ut_line)); 156 strncpy(u.ut_line, ttyname + 5, sizeof(u.ut_line));
157#if defined(HAVE_ID_IN_UTMP) 157#if defined(HAVE_ID_IN_UTMP)
158#ifdef _AIX
159 strncpy(u.ut_id, ttyname + 5, sizeof(u.ut_id));
160#else /* !AIX */
158 strncpy(u.ut_id, ttyname + 8, sizeof(u.ut_id)); 161 strncpy(u.ut_id, ttyname + 8, sizeof(u.ut_id));
162#endif
159#endif /* defined(HAVE_ID_IN_UTMP) */ 163#endif /* defined(HAVE_ID_IN_UTMP) */
160 strncpy(u.ut_name, user, sizeof(u.ut_name)); 164 strncpy(u.ut_name, user, sizeof(u.ut_name));
161#if defined(HAVE_TV_IN_UTMP) 165#if defined(HAVE_TV_IN_UTMP)