From 4af27a5bb25548ae40b22bcf8717568f627209e0 Mon Sep 17 00:00:00 2001 From: Taksh Date: Sun, 13 Sep 2026 06:26:25 +0530 Subject: [PATCH 1/4] Gate lock fingerprint PAM behind the laptop lid Fixes #10096. Fixes #10173. --- bin/omarchy-apply-lock | 3 + bin/omarchy-setup-security-fingerprint | 7 ++- migrations/1789261001.sh | 15 +++++ .../lock-fingerprint-clamshell-gate-test.sh | 57 +++++++++++++++++++ 4 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 migrations/1789261001.sh create mode 100755 test/shell.d/lock-fingerprint-clamshell-gate-test.sh diff --git a/bin/omarchy-apply-lock b/bin/omarchy-apply-lock index 5bb261cbe0a7..c1249a370cbf 100755 --- a/bin/omarchy-apply-lock +++ b/bin/omarchy-apply-lock @@ -43,8 +43,11 @@ EOF if [[ -x /usr/bin/fprintd-list ]] && /usr/bin/fprintd-list "$target_user" 2>/dev/null | grep -qi finger; then echo "Configuring lock screen fingerprint authentication..." + # Same clamshell gate as sudo/polkit / setup-security-fingerprint: lid closed + # skips pam_fprintd and this stack fails closed (password is a parallel PAM). as_root tee /etc/pam.d/omarchy-lock-fingerprint >/dev/null <<'EOF' #%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 EOF diff --git a/bin/omarchy-setup-security-fingerprint b/bin/omarchy-setup-security-fingerprint index e46aaed9ba32..9914907b7330 100755 --- a/bin/omarchy-setup-security-fingerprint +++ b/bin/omarchy-setup-security-fingerprint @@ -58,8 +58,13 @@ EOF setup_lock_fingerprint_pam() { echo "Configuring lock screen for fingerprint authentication..." - sudo tee /etc/pam.d/omarchy-lock-fingerprint >/dev/null <<'EOF' + # Same clamshell gate as sudo/polkit: lid closed → skip pam_fprintd (fail closed + # here — this stack has no password fallback; password runs in a parallel PAM + # service). Re-enrollment must keep rewriting the gate so it cannot be wiped. + local fprintd_gate="auth [success=1 default=ignore] pam_exec.so quiet /usr/bin/omarchy-hw-laptop-closed" + sudo tee /etc/pam.d/omarchy-lock-fingerprint >/dev/null </dev/null || + fail "setup-security-fingerprint still defines setup_lock_fingerprint_pam" + +# Extract the lock PAM writer by grepping the function body for the gate. +grep -A20 'setup_lock_fingerprint_pam()' "$setup" | grep -Fq 'omarchy-hw-laptop-closed' || + fail "setup_lock_fingerprint_pam writes the clamshell pam_exec gate" + +grep -A20 'setup_lock_fingerprint_pam()' "$setup" | grep -Fq 'pam_fprintd.so' || + fail "setup_lock_fingerprint_pam still requires pam_fprintd" + +# Gate must come before pam_fprintd in the generated lock stack. +python3 - "$setup" <<'PY' || fail "lock PAM gate is ordered before pam_fprintd in setup" +import pathlib, re, sys +text = pathlib.Path(sys.argv[1]).read_text() +m = re.search(r"setup_lock_fingerprint_pam\(\) \{(.*?)^\}", text, re.S | re.M) +body = m.group(1) +if "omarchy-hw-laptop-closed" not in body: + raise SystemExit(1) +# In the heredoc / tee payload, gate line must appear before pam_fprintd. +idx_gate = body.find("omarchy-hw-laptop-closed") +idx_fp = body.find("pam_fprintd.so") +if idx_gate < 0 or idx_fp < 0 or idx_gate > idx_fp: + raise SystemExit(1) +PY +pass "setup lock fingerprint PAM includes an ordered clamshell gate" + +grep -Fq 'omarchy-hw-laptop-closed' "$apply" || + fail "apply-lock writes the clamshell gate into omarchy-lock-fingerprint" +# Order inside apply-lock heredoc +python3 - "$apply" <<'PY' || fail "apply-lock orders the gate before pam_fprintd" +import pathlib, sys +text = pathlib.Path(sys.argv[1]).read_text() +start = text.find("omarchy-lock-fingerprint") +chunk = text[start:start+800] +if chunk.find("omarchy-hw-laptop-closed") > chunk.find("pam_fprintd.so"): + raise SystemExit(1) +if "omarchy-hw-laptop-closed" not in chunk: + raise SystemExit(1) +PY +pass "apply-lock lock fingerprint PAM includes an ordered clamshell gate" + +migration="$ROOT/migrations/1789261001.sh" +[[ -f $migration ]] || fail "migration repairs existing lock fingerprint PAM" +grep -Fq 'omarchy-lock-fingerprint' "$migration" || + fail "migration targets omarchy-lock-fingerprint" +grep -Fq 'omarchy-hw-laptop-closed' "$migration" || + fail "migration inserts the laptop-closed gate" +pass "migration installs the lock fingerprint clamshell gate on existing installs" From f0d9055684bb52cad75695b7fa0264d4d2ee10b3 Mon Sep 17 00:00:00 2001 From: Taksh Date: Mon, 14 Sep 2026 09:20:12 +0530 Subject: [PATCH 2/4] Use the silent lid-open polarity for the lock fingerprint gate Match the #10254 fix so adding the clamshell gate to lock PAM does not reintroduce pam_exec LOG_ERR spam on the common lid-open path. --- bin/omarchy-apply-lock | 2 +- bin/omarchy-hw-laptop-open | 18 ++++++++++++++++++ bin/omarchy-setup-security-fingerprint | 8 ++++---- migrations/1789261001.sh | 4 ++-- .../lock-fingerprint-clamshell-gate-test.sh | 14 +++++++------- 5 files changed, 32 insertions(+), 14 deletions(-) create mode 100755 bin/omarchy-hw-laptop-open diff --git a/bin/omarchy-apply-lock b/bin/omarchy-apply-lock index c1249a370cbf..c44a1cbdaa0e 100755 --- a/bin/omarchy-apply-lock +++ b/bin/omarchy-apply-lock @@ -47,7 +47,7 @@ if [[ -x /usr/bin/fprintd-list ]] && # skips pam_fprintd and this stack fails closed (password is a parallel PAM). as_root tee /etc/pam.d/omarchy-lock-fingerprint >/dev/null <<'EOF' #%PAM-1.0 -auth [success=1 default=ignore] pam_exec.so quiet /usr/bin/omarchy-hw-laptop-closed +auth [success=ignore default=1] pam_exec.so quiet /usr/bin/omarchy-hw-laptop-open auth required pam_fprintd.so account include system-local-login EOF diff --git a/bin/omarchy-hw-laptop-open b/bin/omarchy-hw-laptop-open new file mode 100755 index 000000000000..fe09cb6c14f7 --- /dev/null +++ b/bin/omarchy-hw-laptop-open @@ -0,0 +1,18 @@ +#!/bin/bash + +# omarchy:summary=Returns true when the laptop lid is open +# omarchy:hidden=true + +# Inverse of omarchy-hw-laptop-closed. The fingerprint PAM gate uses this so the +# common path (lid open) exits 0 and pam_exec does not LOG_ERR on every +# sudo/polkit auth (#10254). Callers that want "is closed?" keep using +# omarchy-hw-laptop-closed. + +for state in /proc/acpi/button/lid/*/state; do + [[ -r $state ]] || continue + [[ $(<"$state") == *"closed"* ]] && exit 1 + [[ $(<"$state") == *"open"* ]] && exit 0 +done + +# No lid switch (desktop): treat as open so fingerprint stays available. +exit 0 diff --git a/bin/omarchy-setup-security-fingerprint b/bin/omarchy-setup-security-fingerprint index 9914907b7330..4ac802224c5a 100755 --- a/bin/omarchy-setup-security-fingerprint +++ b/bin/omarchy-setup-security-fingerprint @@ -16,14 +16,14 @@ setup_pam_config() { # fixed /usr/bin path the omarchy package always provides, so the gate keeps # working across package installs and dev-link — the latter overlays # $OMARCHY_PATH trees but leaves /usr/bin untouched. - local fprintd_gate="auth [success=1 default=ignore] pam_exec.so quiet /usr/bin/omarchy-hw-laptop-closed" + local fprintd_gate="auth [success=ignore default=1] pam_exec.so quiet /usr/bin/omarchy-hw-laptop-open" # Configure sudo if ! grep -q pam_fprintd.so /etc/pam.d/sudo; then echo "Configuring sudo for fingerprint authentication..." sudo sed -i '1i auth sufficient pam_fprintd.so' /etc/pam.d/sudo fi - if ! grep -q 'omarchy-hw-laptop-closed' /etc/pam.d/sudo; then + if ! grep -q 'omarchy-hw-laptop-open' /etc/pam.d/sudo; then echo "Adding clamshell gate to sudo..." # Insert immediately before pam_fprintd so success=1 skips exactly it. sudo sed -i "/pam_fprintd\.so/i $fprintd_gate" /etc/pam.d/sudo @@ -35,7 +35,7 @@ setup_pam_config() { echo "Configuring polkit for fingerprint authentication..." sudo sed -i '1i auth sufficient pam_fprintd.so' /etc/pam.d/polkit-1 fi - if ! grep -q 'omarchy-hw-laptop-closed' /etc/pam.d/polkit-1; then + if ! grep -q 'omarchy-hw-laptop-open' /etc/pam.d/polkit-1; then echo "Adding clamshell gate to polkit..." sudo sed -i "/pam_fprintd\.so/i $fprintd_gate" /etc/pam.d/polkit-1 fi @@ -61,7 +61,7 @@ setup_lock_fingerprint_pam() { # Same clamshell gate as sudo/polkit: lid closed → skip pam_fprintd (fail closed # here — this stack has no password fallback; password runs in a parallel PAM # service). Re-enrollment must keep rewriting the gate so it cannot be wiped. - local fprintd_gate="auth [success=1 default=ignore] pam_exec.so quiet /usr/bin/omarchy-hw-laptop-closed" + local fprintd_gate="auth [success=ignore default=1] pam_exec.so quiet /usr/bin/omarchy-hw-laptop-open" sudo tee /etc/pam.d/omarchy-lock-fingerprint >/dev/null </dev/null || fail "setup-security-fingerprint still defines setup_lock_fingerprint_pam" # Extract the lock PAM writer by grepping the function body for the gate. -grep -A20 'setup_lock_fingerprint_pam()' "$setup" | grep -Fq 'omarchy-hw-laptop-closed' || +grep -A20 'setup_lock_fingerprint_pam()' "$setup" | grep -Fq 'omarchy-hw-laptop-open' || fail "setup_lock_fingerprint_pam writes the clamshell pam_exec gate" grep -A20 'setup_lock_fingerprint_pam()' "$setup" | grep -Fq 'pam_fprintd.so' || @@ -23,17 +23,17 @@ import pathlib, re, sys text = pathlib.Path(sys.argv[1]).read_text() m = re.search(r"setup_lock_fingerprint_pam\(\) \{(.*?)^\}", text, re.S | re.M) body = m.group(1) -if "omarchy-hw-laptop-closed" not in body: +if "omarchy-hw-laptop-open" not in body: raise SystemExit(1) # In the heredoc / tee payload, gate line must appear before pam_fprintd. -idx_gate = body.find("omarchy-hw-laptop-closed") +idx_gate = body.find("omarchy-hw-laptop-open") idx_fp = body.find("pam_fprintd.so") if idx_gate < 0 or idx_fp < 0 or idx_gate > idx_fp: raise SystemExit(1) PY pass "setup lock fingerprint PAM includes an ordered clamshell gate" -grep -Fq 'omarchy-hw-laptop-closed' "$apply" || +grep -Fq 'omarchy-hw-laptop-open' "$apply" || fail "apply-lock writes the clamshell gate into omarchy-lock-fingerprint" # Order inside apply-lock heredoc python3 - "$apply" <<'PY' || fail "apply-lock orders the gate before pam_fprintd" @@ -41,9 +41,9 @@ import pathlib, sys text = pathlib.Path(sys.argv[1]).read_text() start = text.find("omarchy-lock-fingerprint") chunk = text[start:start+800] -if chunk.find("omarchy-hw-laptop-closed") > chunk.find("pam_fprintd.so"): +if chunk.find("omarchy-hw-laptop-open") > chunk.find("pam_fprintd.so"): raise SystemExit(1) -if "omarchy-hw-laptop-closed" not in chunk: +if "omarchy-hw-laptop-open" not in chunk: raise SystemExit(1) PY pass "apply-lock lock fingerprint PAM includes an ordered clamshell gate" @@ -52,6 +52,6 @@ migration="$ROOT/migrations/1789261001.sh" [[ -f $migration ]] || fail "migration repairs existing lock fingerprint PAM" grep -Fq 'omarchy-lock-fingerprint' "$migration" || fail "migration targets omarchy-lock-fingerprint" -grep -Fq 'omarchy-hw-laptop-closed' "$migration" || +grep -Fq 'omarchy-hw-laptop-open' "$migration" || fail "migration inserts the laptop-closed gate" pass "migration installs the lock fingerprint clamshell gate on existing installs" From 02dc21146faa16c878e1ce1d1f065b9657effcea Mon Sep 17 00:00:00 2001 From: Taksh Date: Mon, 14 Sep 2026 09:20:11 +0530 Subject: [PATCH 3/4] Silence fingerprint clamshell PAM gate on the 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 (#10254). --- bin/omarchy-remove-security-fingerprint | 8 +-- bin/omarchy-setup-security-fingerprint | 15 ++++-- migrations/1789400300.sh | 24 +++++++++ .../fingerprint-clamshell-silent-gate-test.sh | 50 +++++++++++++++++++ 4 files changed, 89 insertions(+), 8 deletions(-) create mode 100644 migrations/1789400300.sh create mode 100755 test/shell.d/fingerprint-clamshell-silent-gate-test.sh diff --git a/bin/omarchy-remove-security-fingerprint b/bin/omarchy-remove-security-fingerprint index 01295892c2a7..61f74a43d42f 100755 --- a/bin/omarchy-remove-security-fingerprint +++ b/bin/omarchy-remove-security-fingerprint @@ -8,15 +8,15 @@ set -e remove_pam_config() { # Remove from sudo (both the fingerprint module and its clamshell gate) - if grep -Eq 'pam_fprintd\.so|omarchy-hw-laptop-closed' /etc/pam.d/sudo; then + if grep -Eq 'pam_fprintd\.so|omarchy-hw-laptop-(open|closed)' /etc/pam.d/sudo; then echo "Removing fingerprint authentication from sudo..." - sudo sed -i -e '/pam_fprintd\.so/d' -e '/omarchy-hw-laptop-closed/d' /etc/pam.d/sudo + sudo sed -i -e '/pam_fprintd\.so/d' -e '/omarchy-hw-laptop-closed/d' -e '/omarchy-hw-laptop-open/d' /etc/pam.d/sudo fi # Remove from polkit (both the fingerprint module and its clamshell gate) - if [[ -f /etc/pam.d/polkit-1 ]] && grep -Eq 'pam_fprintd\.so|omarchy-hw-laptop-closed' /etc/pam.d/polkit-1; then + if [[ -f /etc/pam.d/polkit-1 ]] && grep -Eq 'pam_fprintd\.so|omarchy-hw-laptop-(open|closed)' /etc/pam.d/polkit-1; then echo "Removing fingerprint authentication from polkit..." - sudo sed -i -e '/pam_fprintd\.so/d' -e '/omarchy-hw-laptop-closed/d' /etc/pam.d/polkit-1 + sudo sed -i -e '/pam_fprintd\.so/d' -e '/omarchy-hw-laptop-closed/d' -e '/omarchy-hw-laptop-open/d' /etc/pam.d/polkit-1 fi } diff --git a/bin/omarchy-setup-security-fingerprint b/bin/omarchy-setup-security-fingerprint index 4ac802224c5a..156c8f11b2bf 100755 --- a/bin/omarchy-setup-security-fingerprint +++ b/bin/omarchy-setup-security-fingerprint @@ -8,14 +8,18 @@ set -e setup_pam_config() { # A clamshell gate runs before pam_fprintd in every stack: when the lid is - # shut the reader is unreachable, so it skips fingerprint (success=1) and PAM - # drops straight to the password prompt instead of blocking on the reader - # until it times out. Lid open → fingerprint, then password as the fallback. + # shut the reader is unreachable, so fingerprint is skipped and PAM drops + # straight to the password prompt instead of blocking on the reader until it + # times out. Lid open → fingerprint, then password as the fallback. # # pam_exec needs a literal absolute path (no env expansion). Point at the # fixed /usr/bin path the omarchy package always provides, so the gate keeps # working across package installs and dev-link — the latter overlays # $OMARCHY_PATH trees but leaves /usr/bin untouched. + # + # 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" # Configure sudo @@ -23,9 +27,11 @@ setup_pam_config() { echo "Configuring sudo for fingerprint authentication..." sudo sed -i '1i auth sufficient pam_fprintd.so' /etc/pam.d/sudo fi + # Drop any prior polarity of the gate, then insert the silent lid-open form + # immediately before pam_fprintd so default=1 skips exactly that module. + sudo sed -i -e '/omarchy-hw-laptop-closed/d' -e '/omarchy-hw-laptop-open/d' /etc/pam.d/sudo if ! grep -q 'omarchy-hw-laptop-open' /etc/pam.d/sudo; then echo "Adding clamshell gate to sudo..." - # Insert immediately before pam_fprintd so success=1 skips exactly it. sudo sed -i "/pam_fprintd\.so/i $fprintd_gate" /etc/pam.d/sudo fi @@ -35,6 +41,7 @@ setup_pam_config() { echo "Configuring polkit for fingerprint authentication..." sudo sed -i '1i auth sufficient pam_fprintd.so' /etc/pam.d/polkit-1 fi + sudo sed -i -e '/omarchy-hw-laptop-closed/d' -e '/omarchy-hw-laptop-open/d' /etc/pam.d/polkit-1 if ! grep -q 'omarchy-hw-laptop-open' /etc/pam.d/polkit-1; then echo "Adding clamshell gate to polkit..." sudo sed -i "/pam_fprintd\.so/i $fprintd_gate" /etc/pam.d/polkit-1 diff --git a/migrations/1789400300.sh b/migrations/1789400300.sh new file mode 100644 index 000000000000..49c068756102 --- /dev/null +++ b/migrations/1789400300.sh @@ -0,0 +1,24 @@ +echo "Silence the fingerprint clamshell PAM gate on the common lid-open path" + +# The previous gate ran omarchy-hw-laptop-closed with [success=1 default=ignore]. +# Lid open (the usual case) exited 1, and pam_exec logged that at LOG_ERR on +# every sudo/polkit auth (#10254). Flip to omarchy-hw-laptop-open with +# [success=ignore default=1] so control flow stays the same but the common +# path exits 0. + +gate='auth [success=ignore default=1] pam_exec.so quiet /usr/bin/omarchy-hw-laptop-open' + +for pam in /etc/pam.d/sudo /etc/pam.d/polkit-1 /etc/pam.d/omarchy-lock-fingerprint; do + [[ -f $pam ]] || continue + grep -q 'pam_fprintd\.so' "$pam" || continue + + # Already on the silent polarity. + if grep -q 'omarchy-hw-laptop-open' "$pam"; then + continue + fi + + sudo sed -i -e '/omarchy-hw-laptop-closed/d' -e '/omarchy-hw-laptop-open/d' "$pam" + if ! grep -q 'omarchy-hw-laptop-open' "$pam"; then + sudo sed -i "/pam_fprintd\.so/i $gate" "$pam" + fi +done diff --git a/test/shell.d/fingerprint-clamshell-silent-gate-test.sh b/test/shell.d/fingerprint-clamshell-silent-gate-test.sh new file mode 100755 index 000000000000..bb9435456cd4 --- /dev/null +++ b/test/shell.d/fingerprint-clamshell-silent-gate-test.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +set -euo pipefail + +# The fingerprint clamshell gate must exit 0 on the common lid-open path so +# pam_exec does not fill the journal with LOG_ERR on every sudo/polkit auth. + +source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh" + +helper="$ROOT/bin/omarchy-hw-laptop-open" +[[ -x $helper ]] || fail "omarchy-hw-laptop-open is executable" + +# Match the closed helper's ACPI path convention. +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" + +pass "omarchy-hw-laptop-open is the silent lid-open helper" + +setup="$ROOT/bin/omarchy-setup-security-fingerprint" +grep -q 'omarchy-hw-laptop-open' "$setup" || + fail "fingerprint setup installs the lid-open PAM gate" + +grep -q '\[success=ignore default=1\]' "$setup" || + fail "fingerprint setup uses success=ignore default=1 for the lid-open gate" + +! grep -q 'omarchy-hw-laptop-closed' <<<"$(grep fprintd_gate= "$setup")" || + fail "fingerprint setup gate line must not call omarchy-hw-laptop-closed" + +pass "fingerprint setup installs the silent lid-open PAM gate" + +remove="$ROOT/bin/omarchy-remove-security-fingerprint" +grep -q 'omarchy-hw-laptop-open' "$remove" || + fail "fingerprint remove strips the lid-open PAM gate" + +pass "fingerprint remove strips both gate polarities" + +migration="$ROOT/migrations/1789400300.sh" +[[ -f $migration ]] || fail "a migration rewrites existing PAM gates to the silent polarity" +grep -q 'omarchy-hw-laptop-open' "$migration" || + fail "migration installs the lid-open PAM gate" +grep -q 'omarchy-hw-laptop-closed' "$migration" || + fail "migration removes the lid-closed PAM gate" + +pass "migration flips existing fingerprint PAM gates to the silent polarity" From 0ed661b24f46ed1cc04619ec4decf27cd9a00cef Mon Sep 17 00:00:00 2001 From: Taksh Date: Mon, 14 Sep 2026 17:29:26 +0530 Subject: [PATCH 4/4] Keep the silent clamshell PAM flip off the lock stack Lock is its own PamContext; skipping pam_fprintd there unlocks with the lid shut. --- migrations/1789400300.sh | 6 +++++- test/shell.d/fingerprint-clamshell-silent-gate-test.sh | 10 ++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/migrations/1789400300.sh b/migrations/1789400300.sh index 49c068756102..f7f7456688aa 100644 --- a/migrations/1789400300.sh +++ b/migrations/1789400300.sh @@ -5,10 +5,14 @@ echo "Silence the fingerprint clamshell PAM gate on the common lid-open path" # every sudo/polkit auth (#10254). Flip to omarchy-hw-laptop-open with # [success=ignore default=1] so control flow stays the same but the common # path exits 0. +# +# Lock is a separate PamContext whose only auth module is pam_fprintd. +# Skipping it (default=1) would unlock with the lid shut. Leave that stack +# alone; lid-closed skip on the lock screen belongs in the lock service. gate='auth [success=ignore default=1] pam_exec.so quiet /usr/bin/omarchy-hw-laptop-open' -for pam in /etc/pam.d/sudo /etc/pam.d/polkit-1 /etc/pam.d/omarchy-lock-fingerprint; do +for pam in /etc/pam.d/sudo /etc/pam.d/polkit-1; do [[ -f $pam ]] || continue grep -q 'pam_fprintd\.so' "$pam" || continue diff --git a/test/shell.d/fingerprint-clamshell-silent-gate-test.sh b/test/shell.d/fingerprint-clamshell-silent-gate-test.sh index bb9435456cd4..a778f7c4af60 100755 --- a/test/shell.d/fingerprint-clamshell-silent-gate-test.sh +++ b/test/shell.d/fingerprint-clamshell-silent-gate-test.sh @@ -46,5 +46,11 @@ grep -q 'omarchy-hw-laptop-open' "$migration" || fail "migration installs the lid-open PAM gate" grep -q 'omarchy-hw-laptop-closed' "$migration" || fail "migration removes the lid-closed PAM gate" - -pass "migration flips existing fingerprint PAM gates to the silent polarity" +grep -q '/etc/pam.d/sudo' "$migration" || + fail "migration rewrites sudo" +grep -q '/etc/pam.d/polkit-1' "$migration" || + fail "migration rewrites polkit" +! grep -q 'omarchy-lock-fingerprint' "$migration" || + fail "migration must not gate the lock PAM stack (skipping pam_fprintd unlocks)" + +pass "migration flips sudo/polkit fingerprint PAM gates to the silent polarity"