Repository navigation
Stop the lid gate logging a PAM failure on every open-lid sudo #7871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c0334d0
Stop the lid gate logging a PAM failure on every open-lid sudo
548e97f
Potential fix for pull request finding
vstoyanov 08d4cf8
Cover the lid gate migration with a test
c802950
Say the lid gate's log line is an error, not a notice
omarchybot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | ||
| # | ||
| # 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" | ||
|
vstoyanov marked this conversation as resolved.
Resolved
|
||
| fi | ||
| done | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.