From ec7c0926cc98fa3adb0d70bd82404b52b46d0da4 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 7 Oct 2013 11:40:13 +0100 Subject: 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 integrated prompt to the user. In this case the current package policy (in rpm spec) has been migrated here and is as follows: drak3d requires authentication as the current user. mga#11125 --- polkit/policy/Makefile | 16 ++++++++++++++++ polkit/policy/org.mageia.drak3d.policy.in | 22 ++++++++++++++++++++++ polkit/wrappers/drak3d | 2 ++ 3 files changed, 40 insertions(+) create mode 100644 polkit/policy/Makefile create mode 100644 polkit/policy/org.mageia.drak3d.policy.in create mode 100755 polkit/wrappers/drak3d (limited to 'polkit') diff --git a/polkit/policy/Makefile b/polkit/policy/Makefile new file mode 100644 index 0000000..1de7222 --- /dev/null +++ b/polkit/policy/Makefile @@ -0,0 +1,16 @@ +POLKITPOLICYDEST = $(DESTDIR)/usr/share/polkit-1/actions + +POLICY_IN := $(wildcard *.policy.in) +POLICY = $(POLICY_IN:.policy.in=.policy) + +all: $(POLICY) + +clean: + rm -f $(POLICY) + +install: all + install -d $(POLKITPOLICYDEST) + install -m644 $(POLICY) $(POLKITPOLICYDEST) + +%.policy: %.policy.in + intltool-merge --utf8 ../../po $< $@ -x -u -c ../../po/.intltool-merge-cache diff --git a/polkit/policy/org.mageia.drak3d.policy.in b/polkit/policy/org.mageia.drak3d.policy.in new file mode 100644 index 0000000..ce262ec --- /dev/null +++ b/polkit/policy/org.mageia.drak3d.policy.in @@ -0,0 +1,22 @@ + + + + + Mageia + http://www.mageia.org/ + + + <_description>Run Mageia 3D Desktop Configuration + <_message>Authentication is required to run Mageia 3D Desktop Configuration + drakconf + + no + no + auth_self_keep + + /usr/libexec/drak3d + true + + diff --git a/polkit/wrappers/drak3d b/polkit/wrappers/drak3d new file mode 100755 index 0000000..1f54048 --- /dev/null +++ b/polkit/wrappers/drak3d @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/pkexec /usr/libexec/drak3d $* -- cgit v1.2.1