mirror of
https://github.com/shadow-maint/shadow.git
synced 2024-11-23 10:06:31 +08:00
src/useradd.c: tallylog_reset(): Use Basename() instead of its pattern
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
parent
964df6ed6e
commit
8176e309ed
@ -2081,11 +2081,7 @@ static void tallylog_reset (const char *user_name)
|
||||
failed = 1;
|
||||
break;
|
||||
case 0: /* child */
|
||||
pname = strrchr(pam_tally2, '/');
|
||||
if (pname == NULL)
|
||||
pname = pam_tally2;
|
||||
else
|
||||
pname++; /* Skip the '/' */
|
||||
pname = Basename(pam_tally2);
|
||||
execl(pam_tally2, pname, "--user", user_name, "--reset", "--quiet", NULL);
|
||||
/* If we come here, something has gone terribly wrong */
|
||||
perror(pam_tally2);
|
||||
|
Loading…
Reference in New Issue
Block a user