diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-06-03 18:08:53 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-06-03 18:08:53 +0200 |
commit | 55e0b20685ca389b8a0952a3dca0a52f43e5ecad (patch) | |
tree | 4883c77ff7133ce9524d8efdfab8bdfba4c40d7d /perl-install/run_program.pm | |
parent | 9dd598b045278b889cd9923225ebccf9bcaa9942 (diff) | |
download | drakx-55e0b20685ca389b8a0952a3dca0a52f43e5ecad.tar drakx-55e0b20685ca389b8a0952a3dca0a52f43e5ecad.tar.gz drakx-55e0b20685ca389b8a0952a3dca0a52f43e5ecad.tar.bz2 drakx-55e0b20685ca389b8a0952a3dca0a52f43e5ecad.tar.xz drakx-55e0b20685ca389b8a0952a3dca0a52f43e5ecad.zip |
simplify...
Diffstat (limited to 'perl-install/run_program.pm')
-rw-r--r-- | perl-install/run_program.pm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm index 86386d081..7288ef816 100644 --- a/perl-install/run_program.pm +++ b/perl-install/run_program.pm @@ -201,11 +201,8 @@ sub raw { my $uid; $uid = $ENV{PKEXEC_UID}; $uid ||= common::get_parent_uid(); - my ($full_user) = grep { $_->[2] eq $uid } list_passwd(); - $options->{setuid} = getpwnam($full_user->[0]) if $full_user->[0]; - $home = $full_user->[7] if $full_user; + $options->{setuid} = $uid; } - local $ENV{HOME} = $home if $home; my $args = $options->{sensitive_arguments} ? '<hidden arguments>' : join(' ', @args); log::explanations("running: $real_name $args" . ($root ? " with root $root" : "")); @@ -273,6 +270,7 @@ sub raw { require POSIX; my ($logname, $home) = (getpwuid($options->{setuid}))[0,7]; $ENV{LOGNAME} = $logname if $logname; + $ENV{HOME} = $home if $home; # if we were root and are going to drop privilege, keep a copy of the X11 cookie: if (!$> && $home) { |