swaylock icon indicating copy to clipboard operation
swaylock copied to clipboard

Unlocking via Yubikey regression since updating to 1.8.0

Open b0ch3nski opened this issue 1 year ago • 1 comments
trafficstars

Hi,

I've noticed little regression after updating to 1.8.0.

Behavior on 1.7.2:

  1. Screen is locked, I'm pressing "Enter"
  2. Yubikey blinks, after touching Yubikey screen unlocks, Yubikey stops blinking

Behavior on 1.8.0:

  1. Screen is locked, I'm pressing "Enter"
  2. 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 ... ?

b0ch3nski avatar Oct 02 '24 06:10 b0ch3nski

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 avatar Oct 12 '24 13:10 mstoeckl

@mstoeckl You must have been right - issue is not present in 1.8.2 🎉

b0ch3nski avatar Apr 14 '25 14:04 b0ch3nski