summaryrefslogtreecommitdiffstats
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 de2c89cb..660eb670 100644
--- a/login.c
+++ b/login.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-RCSID("$Id: login.c,v 1.24 2000/04/19 21:42:22 damien Exp $");
+RCSID("$Id: login.c,v 1.25 2000/05/01 12:53:53 damien Exp $");
#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
# include <utmpx.h>
@@ -155,7 +155,11 @@ record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid,
memset(&u, 0, sizeof(u));
strncpy(u.ut_line, ttyname + 5, sizeof(u.ut_line));
#if defined(HAVE_ID_IN_UTMP)
+#ifdef _AIX
+ strncpy(u.ut_id, ttyname + 5, sizeof(u.ut_id));
+#else /* !AIX */
strncpy(u.ut_id, ttyname + 8, sizeof(u.ut_id));
+#endif
#endif /* defined(HAVE_ID_IN_UTMP) */
strncpy(u.ut_name, user, sizeof(u.ut_name));
#if defined(HAVE_TV_IN_UTMP)