diff options
author | Colin Guthrie <colin@mageia.org> | 2013-09-01 13:15:40 +0100 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2013-09-06 15:29:45 +0100 |
commit | b7fa02336d4bfe8b9391d08ad0b6554a68a673e3 (patch) | |
tree | 322a662e9afd5b0cd6be430b53e4c5d7e1128275 | |
parent | 036cfe84f71258d2ee92ef7e5766682e7acc8c31 (diff) | |
download | drakx-b7fa02336d4bfe8b9391d08ad0b6554a68a673e3.tar drakx-b7fa02336d4bfe8b9391d08ad0b6554a68a673e3.tar.gz drakx-b7fa02336d4bfe8b9391d08ad0b6554a68a673e3.tar.bz2 drakx-b7fa02336d4bfe8b9391d08ad0b6554a68a673e3.tar.xz drakx-b7fa02336d4bfe8b9391d08ad0b6554a68a673e3.zip |
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
-rw-r--r-- | perl-install/common.pm | 11 |
1 files changed, 1 insertions, 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() { |