Repository navigation
Conversation
The clamshell gate in front of pam_fprintd is a predicate, not an action: exit 1 means "lid is open, carry on to pam_fprintd". pam_exec has no notion of that and logs every non-zero exit as "failed: exit code 1", so an open lid writes a NOTICE to the journal on each sudo and pkexec. quiet only suppresses the terminal echo. quiet_log suppresses the log write. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3WLvWzgyccPdY6HZhj5po
There was a problem hiding this comment.
Pull request overview
Suppresses expected open-lid pam_exec failure logs during fingerprint authentication.
Changes:
- Adds
quiet_logto new fingerprint PAM gates. - Migrates existing PAM configurations.
- Updates the polkit fixture.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
bin/omarchy-setup-security-fingerprint |
Adds quiet logging to new gates. |
migrations/1787422694.sh |
Updates existing PAM gates. |
test/shell.d/polkit-test.sh |
Updates the PAM fixture. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Verified on real hardware since opening this — ThinkPad with a Synaptics reader, lid open, pam 1.7.2-2. Applied the gate change to a live Fingerprint prompted and authenticated as before, no password fallback — the gate's exit path is unchanged, only the log write is gone. 15 gate lines this boot, all before the change, none after. |
this is true, not gonna lie Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
The polkit fixture only exercised PAM-config detection, so the substitution itself, the no-gate and no-file paths, and second-run idempotency were all untested. Read the pam.d directory from the environment the way 1786380259 reads main.conf, so the test can point the migration at a temp dir. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3WLvWzgyccPdY6HZhj5po
pam_exec writes "failed: exit code N" through pam_syslog at LOG_ERR, which is why it shows up under journalctl -p err. Calling it a NOTICE contradicts the reason quiet_log is there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed and verified on a disposable Omarchy VM (pam 1.7.2, no lid, so Reproduced. With the gate as Tests. Pushed c802950: the new comment in Second opinion from Codex Medium, which may have seen this review, so its agreement is not guaranteed independent. It agreed the problem is real, the change proportionate, and that nothing parsing these lines (setup, remove, Waiting on the maintainer. |
|
Thanks @vstoyanov. #16711 makes the same one-token fix and is the one being taken, because of the migration: this one's is numbered 1787422694, which runs before 1788256455, and that migration's allowlist does not accept a gate carrying |
The clamshell gate in front of
pam_fprintdis a predicate, not an action: exit 1 means "lid is open, carry on to pam_fprintd".pam_exechas no notion of that and logs every non-zero exit atLOG_ERR, so an open lid writes this on each sudo and pkexec:Normal operation, error severity — it makes
journalctl -p erruseless for finding real errors on any laptop with fingerprint set up.quietonly suppresses the terminal echo.quiet_logsuppresses the log write. Both are stockpam_execoptions;quiet_loglanded in Linux-PAM 1.5.2 and exists for exactly this case (linux-pam#334).It does not hide real breakage:
quiet_loggates only the "failed: exit code %d" line. Theexecve(...) failed: %mpath is ungated, so a missing or non-executable helper still logs.Changes
bin/omarchy-setup-security-fingerprint— addquiet_logtofprintd_gate, for new setups.migrations/1787422694.sh— retrofit machines that already took the gate from1784818437or an older setup script.test/shell.d/polkit-test.sh— the clamshell-gate fixture carried the old literal line.1784818437.shis left alone; migrations are marker-file based, so editing an already-run one does nothing.Testing
Migration run against copies of a real
/etc/pam.d/sudoand/etc/pam.d/polkit-1: one line changed per file, idempotent on a second run, no-op when the gate is absent (no fingerprint configured) or whenpolkit-1doesn't exist.test/shellpolkit suite passes.Nothing parses the gate line strictly, so the extra token is safe —
PolkitModel.jsmatchespam_fprintd.sowithindexOf, andomarchy-remove-security-fingerprintdeletes by/omarchy-hw-laptop-closed/d.🤖 Generated with Claude Code