From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1371910-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 7498915808B
	for <garchives@archives.gentoo.org>; Tue,  1 Mar 2022 15:53:32 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 73C7CE0823;
	Tue,  1 Mar 2022 15:53:31 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 5E023E0823
	for <gentoo-commits@lists.gentoo.org>; Tue,  1 Mar 2022 15:53:31 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 19FF6342FF8
	for <gentoo-commits@lists.gentoo.org>; Tue,  1 Mar 2022 15:53:30 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 6E0B02EE
	for <gentoo-commits@lists.gentoo.org>; Tue,  1 Mar 2022 15:53:28 +0000 (UTC)
From: "Ben Kohler" <bkohler@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Ben Kohler" <bkohler@gentoo.org>
Message-ID: <1646150003.05d3853edc7e577afada48a73837199a08773ef2.bkohler@gentoo>
Subject: [gentoo-commits] proj/releng:master commit in: releases/specs/amd64/livegui/files/
X-VCS-Repository: proj/releng
X-VCS-Files: releases/specs/amd64/livegui/files/fsscript-stage2.sh
X-VCS-Directories: releases/specs/amd64/livegui/files/
X-VCS-Committer: bkohler
X-VCS-Committer-Name: Ben Kohler
X-VCS-Revision: 05d3853edc7e577afada48a73837199a08773ef2
X-VCS-Branch: master
Date: Tue,  1 Mar 2022 15:53:28 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 7427852d-9a49-4a20-974b-e0ccc552ba59
X-Archives-Hash: e85b21172a5780a3356d0b44202f046a

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