Skip to content
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

Add new flag to check root user too in ChcekAuthorization #452

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

bluca
Copy link
Member

@bluca bluca commented May 15, 2024

Currently if the subject has uid 0 a shortcut is taken and authorization is immediately granted, without checking against policies and rules. Add a flag that allows skipping this shortcut.

uid 0 can of course alter polkit's behaviour directly, so this is not so much a security feature, but more useful as a safety feature, so that when an action is disabled it cannot be accidentally performed by root, unless they really mean it and bypass polkit.

I intend to make use of this in logind, in the inhibitor functionality, to ensure even root has to drop an inhibitor lock before taking an action.

Currently if the subject has uid 0 a shortcut is taken and authorization
is immediately granted, without checking against policies and rules.
Add a flag that allows skipping this shortcut.

uid 0 can of course alter polkit's behaviour directly, so this is not so
much a security feature, but more useful as a safety feature, so that
when an action is disabled it cannot be accidentally performed by root,
unless they really mean it and bypass polkit.
@jrybar-rh jrybar-rh merged commit 5a0a3cf into polkit-org:main Jun 25, 2024
12 of 13 checks passed
@bluca bluca deleted the always_check_flag branch June 25, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants