From b7fa02336d4bfe8b9391d08ad0b6554a68a673e3 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sun, 1 Sep 2013 13:15:40 +0100 Subject: Drop support for running things via consolehelper. consolehelper is outdated and unreliable. We now prefer polkit and just do a simple test to see if we are root and bail if not. https://wiki.mageia.org/en/Feature:SystemdTidyups#consolehelper.2Fuserhelper_vs._polkit --- perl-install/common.pm | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/perl-install/common.pm b/perl-install/common.pm index ddd471cee..adee703b0 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -381,19 +381,10 @@ sub get_parent_uid() { cat_('/proc/' . getppid() . '/status') =~ /Uid:\s*(\d+)/ ? $1 : undef; } -sub wrap_command_for_root { - my ($name, @args) = @_; - ([ 'consolehelper', $name ], @args); -} - sub require_root_capability() { return if $::testing || !$>; # we're already root - my ($command, @args) = wrap_command_for_root($0, @ARGV); - exec { $command->[0] } $command->[1], @args or die N("command %s missing", $command->[0]); - - # still not root ? - die "you must be root to run this program" if $>; + die "you must be root to run this program"; } sub check_for_xserver() { -- cgit v1.2.1