-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
packagekit: Adjust policy rules for package installation/remove
**Summary** - Allow users in sudo group to remove/install pkgs without prompt
- Loading branch information
1 parent
f72c589
commit 7496ef7
Showing
3 changed files
with
39 additions
and
8 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
packages/p/packagekit/files/0001-policy-Change-group-to-sudo-and-allow-package-remove.patch
This file contains 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,30 @@ | ||
From 10821825e5d80dd9112ac43cd444ea77b4b09df8 Mon Sep 17 00:00:00 2001 | ||
From: Joey Riches <josephriches@gmail.com> | ||
Date: Fri, 15 Mar 2024 22:58:08 +0000 | ||
Subject: [PATCH 1/1] policy: Change group to sudo and allow package-remove | ||
|
||
--- | ||
policy/org.freedesktop.packagekit.rules | 7 ++++++- | ||
1 file changed, 6 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/policy/org.freedesktop.packagekit.rules b/policy/org.freedesktop.packagekit.rules | ||
index 6a1c8a701..73fdbd51c 100644 | ||
--- a/policy/org.freedesktop.packagekit.rules | ||
+++ b/policy/org.freedesktop.packagekit.rules | ||
@@ -1,7 +1,12 @@ | ||
polkit.addRule(function(action, subject) { | ||
if (action.id == "org.freedesktop.packagekit.package-install" && | ||
subject.active == true && subject.local == true && | ||
- subject.isInGroup("wheel")) { | ||
+ subject.isInGroup("sudo")) { | ||
+ return polkit.Result.YES; | ||
+ } | ||
+ if (action.id == "org.freedesktop.packagekit.package-remove" && | ||
+ subject.active == true && subject.local == true && | ||
+ subject.isInGroup("sudo")) { | ||
return polkit.Result.YES; | ||
} | ||
}); | ||
-- | ||
2.44.0 | ||
|
This file contains 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 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