Repository navigation
Fingerprint setup: keep working forks; silent lid-open PAM gate - #12110
chessing234 wants to merge 11 commits into
Conversation
|
The sudo/polkit silent polarity ( Lock fingerprint is its own Lid-closed skip on the lock screen belongs in the lock service, not in that PAM file. #10393 does that with |
3b56166 to
2b47486
Compare
|
dropped the lock pam lid gate — that skip was unlock success; lid policy stays in the lock service |
Match the omacom#10254 fix so adding the clamshell gate to lock PAM does not reintroduce pam_exec LOG_ERR spam on the common lid-open path.
pam_exec logged LOG_ERR whenever omarchy-hw-laptop-closed exited 1, which is the common lid-open case on every sudo/polkit auth. Gate with omarchy-hw-laptop-open and success=ignore so control flow stays the same without flooding the journal (omacom#10254).
Lock is its own PamContext; skipping pam_fprintd there unlocks with the lid shut.
Skipping pam_fprintd on that stack is unlock success. Keep the silent gate on sudo/polkit only; strip it from lock setup, apply-lock, and the migration.
e7c544b to
f6abb11
Compare
omarchy-pkg-missing now calls pacman -Q -- <pkg>. The stub treated -- as the package name, so stock-replacement cases looked like fprintd/usbutils were missing and over-installed.
|
#9873 has merged into Scope checked by GPT-6 in Codex and Codex Medium against the reports and landed source. The second opinion agreed with this scope; independence is not guaranteed. No runtime tests were rerun for this reconciliation. |
[High impact] The changes reach fingerprint authentication for sudo, polkit, and the lock screen. The PR needs fixes before merging because working forks can still be replaced and lid-gated fingerprint authentication still breaks in supported setups. Findings
SummaryThis PR changes fingerprint package selection and flips the sudo/polkit lid check so the usual lid-open path exits successfully.
Reviews (4) · Last reviewed commit: "Merge current fingerprint package and li..." · Reviewed by Greptile |
| libfprint_pkgs=() | ||
| while IFS= read -r pkg; do | ||
| [[ -n $pkg ]] && libfprint_pkgs+=("$pkg") | ||
| done < <(pacman -Qq libfprint libfprint-2 libfprint-git 2>/dev/null | sort -u) |
There was a problem hiding this comment.
Working fork can be replaced If a working libfprint fork is installed under its own package name and provides
libfprint, pacman -Qq does not find it by the provided name. Setup then treats the driver as missing and requests libfprint-git; --ask 4 can remove the working fork. The fork test misses this because its -Qq stub resolves providers.
| # Use omarchy-hw-laptop-open (exit 0 when open) so the common path does not | ||
| # make pam_exec LOG_ERR on every sudo/polkit auth (#10254). success=ignore | ||
| # continues to pam_fprintd; default=1 skips it when the lid is closed. | ||
| local fprintd_gate="auth [success=ignore default=1] pam_exec.so quiet /usr/bin/omarchy-hw-laptop-open" |
There was a problem hiding this comment.
PAM helper may be missing If setup runs from a dev-linked checkout while the installed package predates this helper, dev-link does not put
omarchy-hw-laptop-open at /usr/bin. Setup still replaces the sudo and polkit gates with that absolute path. pam_exec then fails and default=1 skips fingerprint authentication even when the lid is open. The migration can make the same replacement.
| sudo pacman -S --needed --noconfirm --ask 4 "${need_packages[@]}" | ||
| # D-Bus activation keeps a running fprintd mapped to the library that was | ||
| # just replaced; without a restart, enroll can "succeed" against the old .so. | ||
| sudo systemctl try-restart fprintd.service 2>/dev/null || true |
There was a problem hiding this comment.
Restart failure is hidden If a package transaction replaces libfprint while fprintd is active and
try-restart fails, this line hides the error and continues to enrollment against the stale in-memory library. Surfacing that failure would avoid an apparently valid enrollment using the old driver. The new test stub always succeeds, so it does not cover this path.
|
Looked at this again since the head moved to Two models classified it separately from the diff and the linked issue. Opus 5.5 in Claude Code read it as a This now waits on the maintainer. |
| # No lid switch (desktop): treat as open so fingerprint stays available. | ||
| exit 0 |
There was a problem hiding this comment.
omarchy-hw-laptop-open treats every laptop without an ACPI lid file as open. The existing omarchy-hw-laptop-closed also checks input lid switches through logind, including on supported Apple Silicon MacBooks.
After setup or migration switches PAM to this helper, those laptops stop skipping fingerprint authentication when closed. Sudo and polkit can wait for an unreachable reader instead of going straight to the password prompt. Preserve the existing helper’s non-ACPI check when reversing its result.
Knowledge Base Used: Hardware, devices, and power
|
Looked at this again since the head moved to Two models classified it separately from the diff and the linked issue. Opus 5.5 in Claude Code read it as a One defect found by reading the merged head, so it is not lost while this waits. Since #14431, Greptile's "Working fork can be replaced" does not hold: This waits on the maintainer for the classification. |
| grep -q '/proc/acpi/button/lid' "$helper" || | ||
| fail "omarchy-hw-laptop-open reads the ACPI lid state" | ||
|
|
||
| grep -q 'exit 1' "$helper" || | ||
| fail "omarchy-hw-laptop-open exits 1 when the lid is closed" | ||
|
|
||
| grep -q 'exit 0' "$helper" || | ||
| fail "omarchy-hw-laptop-open exits 0 when the lid is open" |
There was a problem hiding this comment.
Tests check strings, not behavior
These checks search for exit statements without running the lid helper, so they can pass when lid detection is broken. AGENTS.md says “Don't restate the implementation” and “No test for a migration,” but this file also checks migration source. The same pattern appears in lock-fingerprint-clamshell-gate-test.sh.
Run the helper against open and closed lid states, check the files setup writes, and remove the migration-source checks. These repository requirements must be satisfied before merging.
File Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Reviewed the new head This waits on the maintainer to resolve the classification. No worker tests ran, no changes were pushed, and no class or verification labels were added. |
Summary
Fixes #11899
Test plan