Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion bin/omarchy-setup-security-fingerprint
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ 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"
#
# quiet_log because the gate is a predicate, not an action: exit 1 just means
# "lid is open, carry on to pam_fprintd". Without it pam_exec writes a NOTICE
# ("failed: exit code 1") on every open-lid sudo and pkexec. quiet alone only
# suppresses the terminal echo.
local fprintd_gate="auth [success=1 default=ignore] pam_exec.so quiet quiet_log /usr/bin/omarchy-hw-laptop-closed"

# Configure sudo
if ! grep -q pam_fprintd.so /etc/pam.d/sudo; then
Expand Down
18 changes: 18 additions & 0 deletions migrations/1787422694.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
echo "Silence the lid gate's per-sudo journal noise"

# 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 machines
# that took the gate from 1784818437 (or an older omarchy-setup-security-
# fingerprint) write a NOTICE to the journal on every open-lid sudo and pkexec.
Comment thread
vstoyanov marked this conversation as resolved.
Resolved
#
# quiet only suppresses the terminal echo; quiet_log suppresses the log write.
# Both are stock pam_exec options (quiet_log since Linux-PAM 1.5.2).

for pam in /etc/pam.d/sudo /etc/pam.d/polkit-1; do
if [[ -f $pam ]] &&
grep -q 'omarchy-hw-laptop-closed' "$pam" &&
! grep -q 'quiet_log.*omarchy-hw-laptop-closed' "$pam"; then
sudo sed -i '/omarchy-hw-laptop-closed/s/pam_exec\.so quiet /pam_exec.so quiet quiet_log /' "$pam"
Comment thread
vstoyanov marked this conversation as resolved.
Resolved
fi
done
2 changes: 1 addition & 1 deletion test/shell.d/polkit-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ auth include system-auth
)
assert(
polkit.fingerprintConfiguredFromPamConfig(`
auth [success=1 default=ignore] pam_exec.so quiet /usr/bin/omarchy-hw-laptop-closed
auth [success=1 default=ignore] pam_exec.so quiet quiet_log /usr/bin/omarchy-hw-laptop-closed
auth sufficient pam_fprintd.so
auth required pam_unix.so
`),
Expand Down