Additional PAM cleanup:
* src/userdel.c, src/newusers.c, src/chpasswd.c, src/chfn.c, src/groupmems.c, src/usermod.c, src/groupdel.c, src/chgpasswd.c, src/useradd.c, src/groupmod.c, src/groupadd.c, src/chage.c, src/chsh.c: If the username cannot be determined, report it as such (not a PAM authentication failure).
This commit is contained in:
@ -571,11 +571,14 @@ static void check_perms (void)
|
||||
|
||||
pampw = getpwuid (getuid ()); /* local, no need for xgetpwuid */
|
||||
if (NULL == pampw) {
|
||||
retval = PAM_USER_UNKNOWN;
|
||||
} else {
|
||||
retval = pam_start ("newusers", pampw->pw_name, &conv, &pamh);
|
||||
fprintf (stderr,
|
||||
_("%s: Cannot determine your user name.\n"),
|
||||
Prog);
|
||||
fail_exit (1);
|
||||
}
|
||||
|
||||
retval = pam_start ("newusers", pampw->pw_name, &conv, &pamh);
|
||||
|
||||
if (PAM_SUCCESS == retval) {
|
||||
retval = pam_authenticate (pamh, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user