diff options
| author | Manuel Stoeckl <code@mstoeckl.com> | 2024-10-12 09:24:10 -0400 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2024-10-12 17:23:50 +0200 |
| commit | fc6fbc98fba775e152443a3d587600767d451fa1 (patch) | |
| tree | 0d19f3ec3b9fd077d2146656f26983b273208947 /pam.c | |
| parent | cca2436ba535d17c49b7d7ba75ebfa6a18ec9209 (diff) | |
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.
Diffstat (limited to 'pam.c')
| -rw-r--r-- | pam.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -109,6 +109,12 @@ void run_pw_backend_child(void) { if (!write_comm_reply(success)) { 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); |
