* src/login.c: Existence of pam_user was already checked. pwd was

already copied to pwent. Remove duplicated code.
This commit is contained in:
nekral-guest 2008-09-20 16:23:04 +00:00
parent f4860274be
commit 9f2ce12b28
2 changed files with 5 additions and 13 deletions

View File

@ -1,3 +1,8 @@
2008-09-20 Nicolas François <nicolas.francois@centraliens.net>
* src/login.c: Existence of pam_user was already checked. pwd was
already copied to pwent. Remove duplicated code.
2008-09-20 Nicolas François <nicolas.francois@centraliens.net>
* src/login.c: check_flags() renamed process_flags(). All flag

View File

@ -810,19 +810,6 @@ int main (int argc, char **argv)
retcode = pam_open_session (pamh, hushed (&pwent) ? PAM_SILENT : 0);
PAM_FAIL_CHECK;
pwd = xgetpwnam (pam_user);
if (NULL == pwd) {
pwent.pw_name = pam_user;
strcpy (temp_pw, "!");
pwent.pw_passwd = temp_pw;
pwent.pw_shell = temp_shell;
preauth_flag = false;
failed = true;
} else {
pwent = *pwd;
}
#else /* ! USE_PAM */
while (true) { /* repeatedly get login/password pairs */
failed = false; /* haven't failed authentication yet */