Stop processing auth requests after success
The child process handling PAM authentication can have multiple requests queued up. As the first success will unlock the screen, there is no point in processing anything afterwards.
This commit is contained in:
parent
cca2436ba5
commit
fc6fbc98fb
6
pam.c
6
pam.c
@ -109,6 +109,12 @@ void run_pw_backend_child(void) {
|
|||||||
if (!write_comm_reply(success)) {
|
if (!write_comm_reply(success)) {
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
/* Unsuccessful requests may be queued after a successful one;
|
||||||
|
* do not process them. */
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pam_setcred(auth_handle, PAM_REFRESH_CRED);
|
pam_setcred(auth_handle, PAM_REFRESH_CRED);
|
||||||
|
Loading…
Reference in New Issue
Block a user