mirror of git://anongit.mindrot.org/openssh.git
- (dtucker) [loginrec.c] Use the SUSv3 specified name for the user name
when using utmpx. Patch from Ed Schouten.
This commit is contained in:
parent
11b5c07941
commit
0b8a2262ac
|
@ -3,6 +3,8 @@
|
|||
have it.
|
||||
- (dtucker) [defines.h] define PRIu64 for platforms that don't have it.
|
||||
- (dtucker) [roaming_client.c] Wrap inttypes.h in an ifdef.
|
||||
- (dtucker) [loginrec.c] Use the SUSv3 specified name for the user name
|
||||
when using utmpx. Patch from Ed Schouten.
|
||||
|
||||
20091208
|
||||
- (dtucker) OpenBSD CVS Sync
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue