aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2016-08-08 15:28:17 +0159
committerAngelo Naselli <anaselli@linux.it>2016-08-08 15:28:17 +0159
commitc47fbdbfe731d38a3207deaae0bc8d199365766d (patch)
treec409bbd97375c647e8fa74de55a59402d95ed3c4
parent2061645868375269041b7f3690181989bd55bbe3 (diff)
downloadmanatools-c47fbdbfe731d38a3207deaae0bc8d199365766d.tar
manatools-c47fbdbfe731d38a3207deaae0bc8d199365766d.tar.gz
manatools-c47fbdbfe731d38a3207deaae0bc8d199365766d.tar.bz2
manatools-c47fbdbfe731d38a3207deaae0bc8d199365766d.tar.xz
manatools-c47fbdbfe731d38a3207deaae0bc8d199365766d.zip
used $ENV{PKEXEC_UID} as in rpmdrake mga#18288
-rw-r--r--lib/ManaTools/Shared/RunProgram.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ManaTools/Shared/RunProgram.pm b/lib/ManaTools/Shared/RunProgram.pm
index 42901aa4..ce557f62 100644
--- a/lib/ManaTools/Shared/RunProgram.pm
+++ b/lib/ManaTools/Shared/RunProgram.pm
@@ -173,7 +173,7 @@ Runs $name with @args parameters. $options is a hash ref that can contains:
=item * B<root>: $name will be chrooted in $root prior to run
-=item * B<as_user>: $name will be run as $ENV{USERHELPER_UID} or with the UID of parent process. Implies I<setuid>
+=item * B<as_user>: $name will be run as $ENV{PKEXEC_UID} or with the UID of parent process. Implies I<setuid>
=item * B<sensitive_arguments>: parameters will be hidden in logs (b/c eg there's a password)
@@ -214,7 +214,7 @@ sub raw {
my $home;
if ($options->{as_user}) {
my $uid;
- $uid = $ENV{USERHELPER_UID} && getpwuid($ENV{USERHELPER_UID});
+ $uid = $ENV{PKEXEC_UID} && getpwuid($ENV{PKEXEC_UID});
$uid ||= _get_parent_uid();
my ($full_user) = grep { $_->[2] eq $uid } list_passwd();
$options->{setuid} = getpwnam($full_user->[0]) if $full_user->[0];