diff options
author | Colin Guthrie <colin@mageia.org> | 2013-09-01 14:07:09 +0100 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2013-09-01 15:12:40 +0100 |
commit | d85cfc53e51bc296ed438ed1e315140e0542fae8 (patch) | |
tree | 059d02a13b628465abfe01d2bd377115fb521fe7 /polkit | |
parent | bfcf1d94d85817ee0edad238dbb171ef1b661e9d (diff) | |
download | control-center-d85cfc53e51bc296ed438ed1e315140e0542fae8.tar control-center-d85cfc53e51bc296ed438ed1e315140e0542fae8.tar.gz control-center-d85cfc53e51bc296ed438ed1e315140e0542fae8.tar.bz2 control-center-d85cfc53e51bc296ed438ed1e315140e0542fae8.tar.xz control-center-d85cfc53e51bc296ed438ed1e315140e0542fae8.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.
As pkexec does not like being run from a forked process, the forking
in the wrapper when running under X has been dropped.
mga#11125
Diffstat (limited to 'polkit')
-rwxr-xr-x | polkit/drakxconf | 2 | ||||
-rw-r--r-- | polkit/org.mageia.control-centre-gui.policy | 22 | ||||
-rw-r--r-- | polkit/org.mageia.control-centre.policy | 22 |
3 files changed, 46 insertions, 0 deletions
diff --git a/polkit/drakxconf b/polkit/drakxconf new file mode 100755 index 00000000..db38e46a --- /dev/null +++ b/polkit/drakxconf @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/pkexec /usr/libexec/drakxconf diff --git a/polkit/org.mageia.control-centre-gui.policy b/polkit/org.mageia.control-centre-gui.policy new file mode 100644 index 00000000..2e25fe17 --- /dev/null +++ b/polkit/org.mageia.control-centre-gui.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 Control Centre GUI</vendor> + <vendor_url>http://mageia.org/control-centre-gui</vendor_url> + + <action id="org.mageia.control-centre-gui.pkexec.run"> + <description>Run Mageia Control Centre GUI</description> + <message>Authentication is required to run Mageia Control Centre GUI</message> + <icon_name>drakconf</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/drakconf</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> +</policyconfig> diff --git a/polkit/org.mageia.control-centre.policy b/polkit/org.mageia.control-centre.policy new file mode 100644 index 00000000..bdc43663 --- /dev/null +++ b/polkit/org.mageia.control-centre.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 Control Centre</vendor> + <vendor_url>http://mageia.org/control-centre</vendor_url> + + <action id="org.mageia.control-centre.pkexec.run"> + <description>Run Mageia Control Centre</description> + <message>Authentication is required to run Mageia Control Centre</message> + <icon_name>drakconf</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/drakxconf</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> +</policyconfig> |