diff options
author | Colin Guthrie <colin@mageia.org> | 2013-11-21 18:52:13 +0000 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2013-11-21 19:32:31 +0000 |
commit | 489c2506cd2fd51efa7b167248a378d07923abfe (patch) | |
tree | ea65effe598be66d9e281d8443ad62adbf9715cc /polkit | |
parent | 8945da36015b735225f42feff9fb4c0addfa39ed (diff) | |
download | drakx-net-489c2506cd2fd51efa7b167248a378d07923abfe.tar drakx-net-489c2506cd2fd51efa7b167248a378d07923abfe.tar.gz drakx-net-489c2506cd2fd51efa7b167248a378d07923abfe.tar.bz2 drakx-net-489c2506cd2fd51efa7b167248a378d07923abfe.tar.xz drakx-net-489c2506cd2fd51efa7b167248a378d07923abfe.zip |
polkit: Fix support for several third party net management commands (mga#11286)
Diffstat (limited to 'polkit')
-rw-r--r-- | polkit/Makefile | 3 | ||||
-rw-r--r-- | polkit/com.redhat.initscripts.ifdown.policy.in | 21 | ||||
-rw-r--r-- | polkit/com.redhat.initscripts.ifup.policy.in | 21 | ||||
-rw-r--r-- | polkit/com.redhat.initscripts.vpn-start.policy.in | 21 | ||||
-rw-r--r-- | polkit/com.redhat.initscripts.vpn-stop.policy.in | 21 | ||||
-rw-r--r-- | polkit/org.mageia-x.set-netprofile.policy.in | 21 |
6 files changed, 107 insertions, 1 deletions
diff --git a/polkit/Makefile b/polkit/Makefile index dc7c4ba..631426e 100644 --- a/polkit/Makefile +++ b/polkit/Makefile @@ -5,7 +5,8 @@ POLKITPOLICYDEST = $(DESTDIR)/usr/share/polkit-1/actions POLICY_IN := $(wildcard *.policy.in) POLICY = $(POLICY_IN:.policy.in=.policy) -WRAPPERS = $(patsubst org.mageia.%.policy,%,$(POLICY)) +MGAPOLICY_IN := $(wildcard org.mageia.*.policy.in) +WRAPPERS = $(patsubst org.mageia.%.policy.in,%,$(MGAPOLICY_IN)) all: $(WRAPPERS) $(POLICY) diff --git a/polkit/com.redhat.initscripts.ifdown.policy.in b/polkit/com.redhat.initscripts.ifdown.policy.in new file mode 100644 index 0000000..1413004 --- /dev/null +++ b/polkit/com.redhat.initscripts.ifdown.policy.in @@ -0,0 +1,21 @@ +<?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="com.redhat.initscripts.ifdown.pkexec.run"> + <_description>Take Network Interface Down</_description> + <_message>Authentication is required to take down a network interface</_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/sbin/ifdown</annotate> + </action> +</policyconfig> diff --git a/polkit/com.redhat.initscripts.ifup.policy.in b/polkit/com.redhat.initscripts.ifup.policy.in new file mode 100644 index 0000000..73ac819 --- /dev/null +++ b/polkit/com.redhat.initscripts.ifup.policy.in @@ -0,0 +1,21 @@ +<?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="com.redhat.initscripts.ifup.pkexec.run"> + <_description>Bring Network Interface Up</_description> + <_message>Authentication is required to bring up a network interface</_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/sbin/ifup</annotate> + </action> +</policyconfig> diff --git a/polkit/com.redhat.initscripts.vpn-start.policy.in b/polkit/com.redhat.initscripts.vpn-start.policy.in new file mode 100644 index 0000000..317b78e --- /dev/null +++ b/polkit/com.redhat.initscripts.vpn-start.policy.in @@ -0,0 +1,21 @@ +<?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="com.redhat.initscripts.vpn-start.pkexec.run"> + <_description>Start Virtual Private Network</_description> + <_message>Authentication is required start the Virtual Private Network</_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/sbin/vpn-start</annotate> + </action> +</policyconfig> diff --git a/polkit/com.redhat.initscripts.vpn-stop.policy.in b/polkit/com.redhat.initscripts.vpn-stop.policy.in new file mode 100644 index 0000000..debfe21 --- /dev/null +++ b/polkit/com.redhat.initscripts.vpn-stop.policy.in @@ -0,0 +1,21 @@ +<?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="com.redhat.initscripts.vpn-stop.pkexec.run"> + <_description>Stop Virtual Private Network</_description> + <_message>Authentication is required stop the Virtual Private Network</_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/sbin/vpn-stop</annotate> + </action> +</policyconfig> diff --git a/polkit/org.mageia-x.set-netprofile.policy.in b/polkit/org.mageia-x.set-netprofile.policy.in new file mode 100644 index 0000000..df91115 --- /dev/null +++ b/polkit/org.mageia-x.set-netprofile.policy.in @@ -0,0 +1,21 @@ +<?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-x.set-netprofile.pkexec.run"> + <_description>Set Network Profile</_description> + <_message>Authentication is required to set the network profile</_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/sbin/set-netprofile</annotate> + </action> +</policyconfig> |