diff options
author | Darren Tucker <dtucker@zip.com.au> | 2010-01-09 18:18:04 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2010-01-09 18:18:04 +1100 |
commit | 0b8a2262ac9ee2b2395cf85e3dfa065385c25b5a (patch) | |
tree | ba8382d0b0e85f801fd828c1fa466b91b0d25a52 /loginrec.c | |
parent | 11b5c07941f206d955184ff1e4c1ff6fba37d157 (diff) |
- (dtucker) [loginrec.c] Use the SUSv3 specified name for the user name
when using utmpx. Patch from Ed Schouten.
Diffstat (limited to 'loginrec.c')
-rw-r--r-- | loginrec.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |