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:
@ -840,11 +840,13 @@ int main (int argc, char **argv)
|
||||
struct passwd *pampw;
|
||||
pampw = getpwuid (getuid ()); /* local, no need for xgetpwuid */
|
||||
if (pampw == NULL) {
|
||||
retval = PAM_USER_UNKNOWN;
|
||||
} else {
|
||||
retval = pam_start ("userdel", pampw->pw_name,
|
||||
&conv, &pamh);
|
||||
fprintf (stderr,
|
||||
_("%s: Cannot determine your user name.\n"),
|
||||
Prog);
|
||||
exit (E_PW_UPDATE);
|
||||
}
|
||||
|
||||
retval = pam_start ("userdel", pampw->pw_name, &conv, &pamh);
|
||||
}
|
||||
|
||||
if (PAM_SUCCESS == retval) {
|
||||
|
Reference in New Issue
Block a user