From 6ef45bf8bfc612edf1d19f53b299d43342c53ccb Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Thu, 11 Feb 2010 14:57:12 +0000 Subject: run_program: use home and logname of user we are dropping privileges to, not 501 --- perl-install/NEWS | 3 +++ perl-install/run_program.pm | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-install/NEWS b/perl-install/NEWS index 27d7cdf3e..e272893e3 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,6 @@ +- run_program: + use home and logname of user we are dropping privileges to, not 501 + Version 13.11 - 10 February 2010 - add support for asturian (#56990) diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm index a59f7a08b..e5ca7d170 100644 --- a/perl-install/run_program.pm +++ b/perl-install/run_program.pm @@ -119,7 +119,7 @@ sub raw { } else { if ($options->{setuid}) { require POSIX; - my ($logname, $home) = (getpwuid(501))[0,7]; + my ($logname, $home) = (getpwuid($options->{setuid}))[0,7]; $ENV{LOGNAME} = $logname if $logname; # if we were root and are going to drop privilege, keep a copy of the X11 cookie: -- cgit v1.2.1