* src/login.c: fflg is already restricted to root. Move
pam_acct_mgmt(), in case of fflg, earlier. This is equivalent and simplifies the code.
This commit is contained in:
parent
2ed05e548b
commit
ca10b825c7
@ -1,3 +1,9 @@
|
||||
2009-04-19 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* src/login.c: fflg is already restricted to root. Move
|
||||
pam_acct_mgmt(), in case of fflg, earlier. This is equivalent and
|
||||
simplifies the code.
|
||||
|
||||
2009-04-19 Paul Szabo <psz@maths.usyd.edu.au>
|
||||
|
||||
* libmisc/utmp.c: Always call endutent or endutxent when setutent
|
||||
|
10
src/login.c
10
src/login.c
@ -670,7 +670,7 @@ int main (int argc, char **argv)
|
||||
PAM_FAIL_CHECK;
|
||||
#endif
|
||||
/* if fflg, then the user has already been authenticated */
|
||||
if (!fflg || (getuid () != 0)) {
|
||||
if (!fflg) {
|
||||
int failcount = 0;
|
||||
char hostn[256];
|
||||
char loginprompt[256]; /* That's one hell of a prompt :) */
|
||||
@ -817,6 +817,9 @@ int main (int argc, char **argv)
|
||||
retcode = pam_chauthtok (pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
|
||||
}
|
||||
|
||||
PAM_FAIL_CHECK;
|
||||
} else (fflg) {
|
||||
retcode = pam_acct_mgmt (pamh, 0);
|
||||
PAM_FAIL_CHECK;
|
||||
}
|
||||
|
||||
@ -838,11 +841,6 @@ int main (int argc, char **argv)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (fflg) {
|
||||
retcode = pam_acct_mgmt (pamh, 0);
|
||||
PAM_FAIL_CHECK;
|
||||
}
|
||||
|
||||
if (setup_groups (pwd) != 0) {
|
||||
exit (1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user