summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--loginrec.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 9e8b41017..31f205f6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
3 have it. 3 have it.
4 - (dtucker) [defines.h] define PRIu64 for platforms that don't have it. 4 - (dtucker) [defines.h] define PRIu64 for platforms that don't have it.
5 - (dtucker) [roaming_client.c] Wrap inttypes.h in an ifdef. 5 - (dtucker) [roaming_client.c] Wrap inttypes.h in an ifdef.
6 - (dtucker) [loginrec.c] Use the SUSv3 specified name for the user name
7 when using utmpx. Patch from Ed Schouten.
6 8
720091208 920091208
8 - (dtucker) OpenBSD CVS Sync 10 - (dtucker) OpenBSD CVS Sync
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);