gnome-initial-setup/0008-polkit-Add-fedora-specfic-rules.patch
2023-09-10 20:20:10 -04:00

52 lines
2.1 KiB
Diff

From 2706720a58dba752ca0dbc65d7f1425df7db3bda Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Sun, 13 Aug 2023 16:33:49 -0400
Subject: [PATCH 8/9] polkit: Add fedora specfic rules
We should probably add some way to check vendor.conf for the policy
updates instead of a hardcoded list.
---
data/20-gnome-initial-setup.rules.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/data/20-gnome-initial-setup.rules.in b/data/20-gnome-initial-setup.rules.in
index 881efde9..f5b7d981 100644
--- a/data/20-gnome-initial-setup.rules.in
+++ b/data/20-gnome-initial-setup.rules.in
@@ -1,30 +1,31 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
//
// DO NOT EDIT THIS FILE, it will be overwritten on update.
//
// Allow the gnome-initial-setup user to do certain actions without
// being interrupted by password dialogs
polkit.addRule(function(action, subject) {
if (subject.user !== 'gnome-initial-setup')
return undefined;
var actionMatches = (action.id.indexOf('org.freedesktop.hostname1.') === 0 ||
action.id.indexOf('org.freedesktop.NetworkManager.') === 0 ||
action.id.indexOf('org.freedesktop.locale1.') === 0 ||
action.id.indexOf('org.freedesktop.accounts.') === 0 ||
action.id.indexOf('org.freedesktop.timedate1.') === 0 ||
action.id.indexOf('org.freedesktop.realmd.') === 0 ||
action.id.indexOf('com.endlessm.ParentalControls.') === 0 ||
action.id.indexOf('org.fedoraproject.thirdparty.') === 0 ||
- action.id.indexOf('org.freedesktop.login1.reboot') === 0);
+ action.id.indexOf('org.freedesktop.login1.reboot') === 0 ||
+ action.id.indexOf('org.fedoraproject.pkexec.liveinst') === 0);
if (actionMatches) {
if (subject.local)
return 'yes';
else
return 'auth_admin';
}
return undefined;
});
--
2.41.0