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:
nekral-guest
2008-09-06 23:46:44 +00:00
parent 49f0d8b680
commit bab84a13ff
14 changed files with 80 additions and 46 deletions

View File

@ -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) {