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)
downloadopenssh-git-9550a76c3716acc1a591dd9604cbc958a92ad891.tar.gz
- 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 80a63f3d..5c58d814 100644
--- a/login.c
+++ b/login.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-RCSID("$Id: login.c,v 1.14 1999/12/27 23:41:12 damien Exp $");
+RCSID("$Id: login.c,v 1.15 1999/12/28 15:32:22 damien Exp $");
#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
# include <utmpx.h>
@@ -141,7 +141,9 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid,
/* Construct an utmp/wtmp entry. */
memset(&u, 0, sizeof(u));
strncpy(u.ut_line, ttyname + 5, sizeof(u.ut_line));
+#if defined(HAVE_ID_IN_UTMP)
strncpy(u.ut_id, ttyname + 8, sizeof(u.ut_id));
+#endif /* defined(HAVE_ID_IN_UTMP) */
strncpy(u.ut_name, user, sizeof(u.ut_name));
#if defined(HAVE_TV_IN_UTMP)
(void)gettimeofday(&u.ut_tv, NULL);