aboutsummaryrefslogtreecommitdiffstats
path: root/polkit/policy
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-09-03 11:58:05 +0100
committerColin Guthrie <colin@mageia.org>2013-09-03 12:15:20 +0100
commitf7cc863196075c0f0634a115e3417370e8646acd (patch)
treed1e48cddebb32982e154c543bc69a2133a1680fa /polkit/policy
parentce2a0726339307d5b747ac397825adf2cad396ac (diff)
downloadrpmdrake-f7cc863196075c0f0634a115e3417370e8646acd.tar
rpmdrake-f7cc863196075c0f0634a115e3417370e8646acd.tar.gz
rpmdrake-f7cc863196075c0f0634a115e3417370e8646acd.tar.bz2
rpmdrake-f7cc863196075c0f0634a115e3417370e8646acd.tar.xz
rpmdrake-f7cc863196075c0f0634a115e3417370e8646acd.zip
Convert to polkit from usermode consolehelper for gaining root privileges
polkit is better integrated into various environments, both console and GUI and offers better access rules and prevents the internal need to run su which is prone to errors and doesn't offer an environment agnostic prompt to the user. The 'auth as user' (as opposed to 'auth as root') for the 'MageiaUpdate' binary has been ported to the polkit equiv. mga#11125
Diffstat (limited to 'polkit/policy')
-rw-r--r--polkit/policy/org.mageia.rpmdrake-addmedia.policy22
-rw-r--r--polkit/policy/org.mageia.rpmdrake-editmedia.policy22
-rw-r--r--polkit/policy/org.mageia.rpmdrake-update.policy22
-rw-r--r--polkit/policy/org.mageia.rpmdrake.policy22
4 files changed, 88 insertions, 0 deletions
diff --git a/polkit/policy/org.mageia.rpmdrake-addmedia.policy b/polkit/policy/org.mageia.rpmdrake-addmedia.policy
new file mode 100644
index 00000000..4f4435f5
--- /dev/null
+++ b/polkit/policy/org.mageia.rpmdrake-addmedia.policy
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+<policyconfig>
+
+ <vendor>Mageia</vendor>
+ <vendor_url>http://www.mageia.org/</vendor_url>
+
+ <action id="org.mageia.rpmdrake-addmedia.pkexec.run">
+ <description>Run Mageia Package Media Adder</description>
+ <message>Authentication is required to run Mageia Package Media Adder</message>
+ <icon_name>rpmdrake</icon_name>
+ <defaults>
+ <allow_any>no</allow_any>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>auth_admin_keep</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/gurpmi.addmedia</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+</policyconfig>
diff --git a/polkit/policy/org.mageia.rpmdrake-editmedia.policy b/polkit/policy/org.mageia.rpmdrake-editmedia.policy
new file mode 100644
index 00000000..d5a56cd4
--- /dev/null
+++ b/polkit/policy/org.mageia.rpmdrake-editmedia.policy
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+<policyconfig>
+
+ <vendor>Mageia</vendor>
+ <vendor_url>http://www.mageia.org/</vendor_url>
+
+ <action id="org.mageia.rpmdrake-editmedia.pkexec.run">
+ <description>Run Mageia Package Media Editor</description>
+ <message>Authentication is required to run Mageia Package Media Editor</message>
+ <icon_name>rpmdrake</icon_name>
+ <defaults>
+ <allow_any>no</allow_any>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>auth_admin_keep</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakrpm-edit-media</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+</policyconfig>
diff --git a/polkit/policy/org.mageia.rpmdrake-update.policy b/polkit/policy/org.mageia.rpmdrake-update.policy
new file mode 100644
index 00000000..c9437bfb
--- /dev/null
+++ b/polkit/policy/org.mageia.rpmdrake-update.policy
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+<policyconfig>
+
+ <vendor>Mageia</vendor>
+ <vendor_url>http://www.mageia.org/</vendor_url>
+
+ <action id="org.mageia.rpmdrake-update.pkexec.run">
+ <description>Run Mageia Updater</description>
+ <message>Authentication is required to run Mageia Updater</message>
+ <icon_name>rpmdrake</icon_name>
+ <defaults>
+ <allow_any>no</allow_any>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>auth_self_keep</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/MageiaUpdate</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+</policyconfig>
diff --git a/polkit/policy/org.mageia.rpmdrake.policy b/polkit/policy/org.mageia.rpmdrake.policy
new file mode 100644
index 00000000..5b7b3ee8
--- /dev/null
+++ b/polkit/policy/org.mageia.rpmdrake.policy
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+<policyconfig>
+
+ <vendor>Mageia</vendor>
+ <vendor_url>http://www.mageia.org/</vendor_url>
+
+ <action id="org.mageia.rpmdrake.pkexec.run">
+ <description>Run Mageia Package Manager</description>
+ <message>Authentication is required to run Mageia Package Manager</message>
+ <icon_name>rpmdrake</icon_name>
+ <defaults>
+ <allow_any>no</allow_any>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>auth_admin_keep</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/rpmdrake</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+</policyconfig>