swaylock
swaylock copied to clipboard
Unlocking via Yubikey regression since updating to 1.8.0
Hi,
I've noticed little regression after updating to 1.8.0.
Behavior on 1.7.2:
- Screen is locked, I'm pressing "Enter"
- Yubikey blinks, after touching Yubikey screen unlocks, Yubikey stops blinking
Behavior on 1.8.0:
- Screen is locked, I'm pressing "Enter"
- Yubikey blinks, after touching Yubikey screen unlocks, but Yubikey still blinks (or starts blinking again? hard to notice) like it's waiting for another touch input
Here is a relevant /etc/pam.d/system-auth section:
#%PAM-1.0
auth sufficient pam_u2f.so authfile=/etc/u2f_mappings cue
auth required pam_faillock.so preauth
...
My guess is that for some reason, swaylock tries to go through PAM twice ... ?
I don't have the setup to reproduce this issue, but suspect it's caused by swaylock queuing multiple unlock requests to its PAM handling subprocess, which tries to process all of them instead of stopping at the first success. (See e.g. run_pw_backend_child().) If my theory is correct, then building swaylock using either of #379 and #375 should prevent the described behavior.
@mstoeckl You must have been right - issue is not present in 1.8.2 🎉