From d85cfc53e51bc296ed438ed1e315140e0542fae8 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sun, 1 Sep 2013 14:07:09 +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 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 --- wrapper | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'wrapper') diff --git a/wrapper b/wrapper index 8fda9f2f..56627542 100644 --- a/wrapper +++ b/wrapper @@ -27,12 +27,8 @@ use lib qw(/usr/lib/libDrakX); use common; -if (!check_for_xserver()) { - exec ("/usr/sbin/drakxconf @ARGV; reset"); +if (check_for_xserver()) { + exec ("/usr/bin/pkexec", "/usr/libexec/drakconf", @ARGV); } else { - unless (my $pid = fork) { - print "cannot fork\n" unless defined $pid; - exec ("/usr/sbin/drakconf.real", @ARGV); - } - + exec ("/usr/bin/pkexec", "/usr/libexec/drakxconf", @ARGV); } -- cgit v1.2.1