Log an error if the password entry could not be
found (respect LOG_UNKFAIL_ENAB to avoid logging a password). This fixes the Debian bug http://bugs.debian.org/451521
This commit is contained in:
parent
ca875647b9
commit
90ef765c2e
@ -1,3 +1,9 @@
|
|||||||
|
2007-11-17 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* src/login.c: Log an error if the password entry could not be
|
||||||
|
found (respect LOG_UNKFAIL_ENAB to avoid logging a password). This
|
||||||
|
fixes the Debian bug http://bugs.debian.org/451521
|
||||||
|
|
||||||
2007-11-17 Nicolas François <nicolas.francois@centraliens.net>
|
2007-11-17 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* man/useradd.8.xml: -b documenation: Use the same notation for
|
* man/useradd.8.xml: -b documenation: Use the same notation for
|
||||||
|
10
src/login.c
10
src/login.c
@ -739,15 +739,21 @@ int main (int argc, char **argv)
|
|||||||
pam_get_item (pamh, PAM_USER, (const void **) &pam_user);
|
pam_get_item (pamh, PAM_USER, (const void **) &pam_user);
|
||||||
setpwent ();
|
setpwent ();
|
||||||
pwd = getpwnam (pam_user);
|
pwd = getpwnam (pam_user);
|
||||||
|
if (!pwd) {
|
||||||
|
SYSLOG ((LOG_ERR, "getpwnam(%s) failed",
|
||||||
|
getdef_bool ("LOG_UNKFAIL_ENAB") ?
|
||||||
|
pam_user : "UNKNOWN"));
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
if (fflg) {
|
if (fflg) {
|
||||||
retcode = pam_acct_mgmt (pamh, 0);
|
retcode = pam_acct_mgmt (pamh, 0);
|
||||||
PAM_FAIL_CHECK;
|
PAM_FAIL_CHECK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pwd || setup_groups (pwd))
|
if (setup_groups (pwd)) {
|
||||||
exit (1);
|
exit (1);
|
||||||
else
|
|
||||||
pwent = *pwd;
|
pwent = *pwd;
|
||||||
|
|
||||||
retcode = pam_setcred (pamh, PAM_ESTABLISH_CRED);
|
retcode = pam_setcred (pamh, PAM_ESTABLISH_CRED);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user