commit:     05d3853edc7e577afada48a73837199a08773ef2
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  1 15:51:31 2022 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Tue Mar  1 15:53:23 2022 +0000
URL:        https://gitweb.gentoo.org/proj/releng.git/commit/?id=05d3853e

specs/amd64/livegui: add polkit exceptions for partition tools

Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 releases/specs/amd64/livegui/files/fsscript-stage2.sh | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/releases/specs/amd64/livegui/files/fsscript-stage2.sh 
b/releases/specs/amd64/livegui/files/fsscript-stage2.sh
index 5656bd3c..32931eb6 100755
--- a/releases/specs/amd64/livegui/files/fsscript-stage2.sh
+++ b/releases/specs/amd64/livegui/files/fsscript-stage2.sh
@@ -48,3 +48,16 @@ wget "https://dev.gentoo.org/~bkohler/livegui/face.icon.png"; 
-O .face.icon
 popd
 # Clean up perms
 chown -R gentoo:users /home/gentoo
+
+# Let some tools run as root
+echo "polkit.addRule(function(action, subject) {
+    if (action.id == "org.gnome.gparted") {
+        return polkit.Result.YES;
+    }
+});
+
+polkit.addRule(function(action, subject) {
+    if (action.id == "org.kde.kpmcore.externalcommand.init") {
+        return polkit.Result.YES;
+    }
+});" > /etc/polkit-1/rules.d/livegui-root-tools.rules

Reply via email to