From 0b8a2262ac9ee2b2395cf85e3dfa065385c25b5a Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sat, 9 Jan 2010 18:18:04 +1100 Subject: - (dtucker) [loginrec.c] Use the SUSv3 specified name for the user name when using utmpx. Patch from Ed Schouten. --- loginrec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'loginrec.c') 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) utx->ut_pid = li->pid; /* strncpy(): Don't necessarily want null termination */ - strncpy(utx->ut_name, li->username, - MIN_SIZEOF(utx->ut_name, li->username)); + strncpy(utx->ut_user, li->username, + MIN_SIZEOF(utx->ut_user, li->username)); if (li->type == LTYPE_LOGOUT) return; @@ -1316,8 +1316,8 @@ wtmpx_write_entry(struct logininfo *li) static int wtmpx_islogin(struct logininfo *li, struct utmpx *utx) { - if (strncmp(li->username, utx->ut_name, - MIN_SIZEOF(li->username, utx->ut_name)) == 0 ) { + if (strncmp(li->username, utx->ut_user, + MIN_SIZEOF(li->username, utx->ut_user)) == 0 ) { # ifdef HAVE_TYPE_IN_UTMPX if (utx->ut_type == USER_PROCESS) return (1); -- cgit v1.2.3