omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

setup security fingerprint wipes the clamshell gate from omarchy-lock-fingerprint

Open 1818TusculumSt opened this issue 3 months ago • 1 comments

What happened

Running omarchy setup security fingerprint (to re-enroll a print) silently removed the clamshell gate from the lock-screen PAM stack.

Before the wizard, /etc/pam.d/omarchy-lock-fingerprint contained:

#%PAM-1.0
auth       [success=1 default=ignore] pam_exec.so quiet /usr/bin/omarchy-hw-laptop-closed
auth       required                    pam_fprintd.so
account    include                     system-local-login

After the wizard, it contained:

#%PAM-1.0
auth       required                    pam_fprintd.so
account    include                     system-local-login

So with the lid closed (docked, reader unreachable), the lock screen blocks on the fingerprint reader until timeout instead of dropping straight to the password prompt.

What was expected

The gate should survive a re-enrollment. The wizard already knows about it: setup_pam_config in the same script inserts the omarchy-hw-laptop-closed gate before pam_fprintd.so in the sudo and polkit stacks, with comments stating the gate "runs before pam_fprintd in every stack". Only setup_lock_fingerprint_pam()'s heredoc omits it.

Steps to reproduce

  1. Have the clamshell gate present in /etc/pam.d/omarchy-lock-fingerprint
  2. Run omarchy setup security fingerprint and complete enrollment
  3. cat /etc/pam.d/omarchy-lock-fingerprint — the pam_exec … omarchy-hw-laptop-closed line is gone

Suggested fix

Include the gate line in setup_lock_fingerprint_pam()'s heredoc, sharing the $fprintd_gate variable the same script already defines (same pattern as the polkit heredoc branch).

System details

  • Omarchy 4.0.2-1, kernel 7.1.9-arch1-2, i7-1270P
  • fprintd 1.94.5-2, libfprint 1.94.100-1
  • Sensor: 06cb:00fc Synaptics Prometheus Fingerprint Reader

1818TusculumSt avatar Sep 04 '26 12:09 1818TusculumSt

This is the same change as #10096, which you opened about twelve hours earlier, so I'm closing this one as a duplicate of it. Both ask for the pam_exec … omarchy-hw-laptop-closed gate in the stack Omarchy writes to /etc/pam.d/omarchy-lock-fingerprint. Once that stack carries the gate, re-running setup leaves it in place.

What I checked on quattro (10f1cbf7c):

  • The lock stack is now written by bin/omarchy-apply-lock (lines 62–66), which setup calls after enrolling. Its heredoc still has only pam_fprintd.so and account include system-local-login. No Omarchy release has written the gate there; v4.0.0 and v4.0.2 match. So the gate in your "before" file was added by hand, and any run of omarchy-apply-lock replaces it.
  • The lock screen runs password and fingerprint as two separate PAM contexts (omarchy-lock-password and omarchy-lock-fingerprint in shell/plugins/lock/Service.qml). With the lid closed, password unlock still works; the cost is fingerprint attempts against an unreachable reader, which #14251 also reports.
  • On an Omarchy worker running pam 1.7.2, I authenticated against your "before" stack with /usr/bin/true standing in for a closed lid. It returned PAM_PERM_DENIED, not success, so jumping past the only auth module does not unlock the screen. A control stack without the gate returned PAM_AUTH_ERR. Whoever fixes #10096 can rule out the bypass some comments there worry about, but a closed lid would make each fingerprint attempt fail instantly, which brings in the retry pacing tracked in #14898.

Codex Medium also reviewed the duplicate call. If these turn out to be different, reopen this and say what differs. The fix itself waits on the maintainer at #10096.

omarchybot avatar Oct 11 '26 04:10 omarchybot