summaryrefslogtreecommitdiff
path: root/loginrec.c
diff options
context:
space:
mode:
Diffstat (limited to 'loginrec.c')
-rw-r--r--loginrec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/loginrec.c b/loginrec.c
index f4af06736..bca959707 100644
--- a/loginrec.c
+++ b/loginrec.c
@@ -758,8 +758,8 @@ construct_utmpx(struct logininfo *li, struct utmpx *utx)
758 utx->ut_pid = li->pid; 758 utx->ut_pid = li->pid;
759 759
760 /* strncpy(): Don't necessarily want null termination */ 760 /* strncpy(): Don't necessarily want null termination */
761 strncpy(utx->ut_name, li->username, 761 strncpy(utx->ut_user, li->username,
762 MIN_SIZEOF(utx->ut_name, li->username)); 762 MIN_SIZEOF(utx->ut_user, li->username));
763 763
764 if (li->type == LTYPE_LOGOUT) 764 if (li->type == LTYPE_LOGOUT)
765 return; 765 return;
@@ -1316,8 +1316,8 @@ wtmpx_write_entry(struct logininfo *li)
1316static int 1316static int
1317wtmpx_islogin(struct logininfo *li, struct utmpx *utx) 1317wtmpx_islogin(struct logininfo *li, struct utmpx *utx)
1318{ 1318{
1319 if (strncmp(li->username, utx->ut_name, 1319 if (strncmp(li->username, utx->ut_user,
1320 MIN_SIZEOF(li->username, utx->ut_name)) == 0 ) { 1320 MIN_SIZEOF(li->username, utx->ut_user)) == 0 ) {
1321# ifdef HAVE_TYPE_IN_UTMPX 1321# ifdef HAVE_TYPE_IN_UTMPX
1322 if (utx->ut_type == USER_PROCESS) 1322 if (utx->ut_type == USER_PROCESS)
1323 return (1); 1323 return (1);