Repository navigation
Fall back to polkit when the DNS sudoers grant is missing - #7492
Merged
Merged
Conversation
grant_covers re-implemented etc/sudoers.d/omarchy-dns in bash -- one of the three providers, and %wheel -- but never asked whether the rule was installed. It ships in the etc/ tree that omarchy-settings copies, so every machine still on an older settings package answers yes to a grant it does not have. require_root then execs into sudo with no way back, and the panel's one-click toggle dies on a password prompt it has no terminal to show. Ask sudo instead. `sudo -l` alone reports whether a command is permitted, which the blanket %wheel rule answers yes to for everything, but the long listing prints the matched entry's tags -- !authenticate is the grant and nothing else. It runs nothing, and under -n it prompts for nothing, so a machine without the rule falls through to polkit and gets a prompt on screen. The provider list and the wheel check go away with it; sudo owns that policy now, and it stays right if the rule is ever edited or removed. Co-Authored-By: Claude Opus 5 <[email protected]>
sgruendel
pushed a commit
to sgruendel/omarchy
that referenced
this pull request
Aug 22, 2026
grant_covers re-implemented etc/sudoers.d/omarchy-dns in bash -- one of the three providers, and %wheel -- but never asked whether the rule was installed. It ships in the etc/ tree that omarchy-settings copies, so every machine still on an older settings package answers yes to a grant it does not have. require_root then execs into sudo with no way back, and the panel's one-click toggle dies on a password prompt it has no terminal to show. Ask sudo instead. `sudo -l` alone reports whether a command is permitted, which the blanket %wheel rule answers yes to for everything, but the long listing prints the matched entry's tags -- !authenticate is the grant and nothing else. It runs nothing, and under -n it prompts for nothing, so a machine without the rule falls through to polkit and gets a prompt on screen. The provider list and the wheel check go away with it; sudo owns that policy now, and it stays right if the rule is ever edited or removed. Co-authored-by: Claude Opus 5 <[email protected]>
dhh
added a commit
that referenced
this pull request
Aug 23, 2026
grant_covers re-implemented etc/sudoers.d/omarchy-dns in bash -- one of the three providers, and %wheel -- but never asked whether the rule was installed. It ships in the etc/ tree that omarchy-settings copies, so every machine still on an older settings package answers yes to a grant it does not have. require_root then execs into sudo with no way back, and the panel's one-click toggle dies on a password prompt it has no terminal to show. Ask sudo instead. `sudo -l` alone reports whether a command is permitted, which the blanket %wheel rule answers yes to for everything, but the long listing prints the matched entry's tags -- !authenticate is the grant and nothing else. It runs nothing, and under -n it prompts for nothing, so a machine without the rule falls through to polkit and gets a prompt on screen. The provider list and the wheel check go away with it; sudo owns that policy now, and it stays right if the rule is ever edited or removed. Co-authored-by: Claude Opus 5 <[email protected]> (cherry picked from commit 1e70cca)
Closed
nick1udwig
pushed a commit
to nick1udwig/omarchy
that referenced
this pull request
Sep 9, 2026
grant_covers re-implemented etc/sudoers.d/omarchy-dns in bash -- one of the three providers, and %wheel -- but never asked whether the rule was installed. It ships in the etc/ tree that omarchy-settings copies, so every machine still on an older settings package answers yes to a grant it does not have. require_root then execs into sudo with no way back, and the panel's one-click toggle dies on a password prompt it has no terminal to show. Ask sudo instead. `sudo -l` alone reports whether a command is permitted, which the blanket %wheel rule answers yes to for everything, but the long listing prints the matched entry's tags -- !authenticate is the grant and nothing else. It runs nothing, and under -n it prompts for nothing, so a machine without the rule falls through to polkit and gets a prompt on screen. The provider list and the wheel check go away with it; sudo owns that policy now, and it stays right if the rule is ever edited or removed. Co-authored-by: Claude Opus 5 <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #7472. Switching DNS providers from the network panel still does nothing on any machine that has not yet picked up the
omarchy-settingsbuild carryingetc/sudoers.d/omarchy-dns— no password prompt, no DNS change.grant_coversre-implemented the sudoers rule in bash: one of the three stock providers, and%wheel. Both halves can hold on a machine where the rule is not installed at all. The file ships in theetc/tree thatomarchy-settingscopies, so it arrives on a package upgrade rather than withbin/, and until then everywheeluser answers yes to a grant they do not have.require_rootthenexecs into sudo with nothing to fall back to:The panel runs
bash -c omarchy-dns Cloudflarewith no tty, so that is where it ends.Ask sudo instead of predicting it.
sudo -lon its own reports whether a command is permitted, which the blanket%wheelrule answers yes to for every argument — that objection from #7472 stands. But the long listing prints the matched entry's tags, and!authenticateis the grant and nothing else:Listing runs nothing, and under
-nit prompts for nothing, so a machine without the rule falls through to polkit and gets a prompt on screen instead of dying silently. Both strings come from sudo's own listing formatter insudoers.so, not from a locale-dependent message.The provider list and the wheel check go away with it. Sudo owns that policy now, so the script stays correct if the rule is ever edited, removed, or scoped differently — the class of drift that caused this.
The test's stubbed
idand group logic go too, replaced by a case that pins the regression: grant absent, provider granted, no terminal → polkit rather than a dead sudo.Note for anyone hitting this today: no migration is needed or wanted. Writing the file from one would leave it unowned, and pacman would then refuse the eventual
omarchy-settingsupgrade with "exists in filesystem" — the trap that forced the--overwritelist inomarchy-upgrade-to-quattro. It lands on its own with the next settings build.🤖 Generated with Claude Code