diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-09-17 10:29:25 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-09-17 10:29:25 +0000 |
commit | 140f4569c48acbec044ab828de2c75fd243e586e (patch) | |
tree | e9f3f132abb6e43da63a447c61d7a5c76f84d855 /perl-install/run_program.pm | |
parent | faefac1d912a14cd79b3a27a3f1f5f74077ad352 (diff) | |
download | drakx-140f4569c48acbec044ab828de2c75fd243e586e.tar drakx-140f4569c48acbec044ab828de2c75fd243e586e.tar.gz drakx-140f4569c48acbec044ab828de2c75fd243e586e.tar.bz2 drakx-140f4569c48acbec044ab828de2c75fd243e586e.tar.xz drakx-140f4569c48acbec044ab828de2c75fd243e586e.zip |
(raw) do not crash when trying to guess homedir before running another process (mga#7403)
Diffstat (limited to 'perl-install/run_program.pm')
-rw-r--r-- | perl-install/run_program.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm index 3736f4dad..a45b5b79b 100644 --- a/perl-install/run_program.pm +++ b/perl-install/run_program.pm @@ -69,7 +69,8 @@ sub raw { $uid = $ENV{USERHELPER_UID} && getpwuid($ENV{USERHELPER_UID}); $uid ||= common::get_parent_uid(); $options->{setuid} = getpwnam($uid) if $uid; - $home = $uid->[7] if $uid; + my ($full_user) = grep { $_->[2] eq $uid } list_passwd(); + $home = $full_user->[7] if $full_user; } local $ENV{HOME} = $home if $home; |