diff options
author | Pascal Terjan <pterjan@mandriva.org> | 2010-02-11 16:43:54 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mandriva.org> | 2010-02-11 16:43:54 +0000 |
commit | b52db46be273281f0c00bd87b71bbf0ab451a4cd (patch) | |
tree | 98079d3ad7bd84c0f90911ff7a85691dc7874551 /perl-install | |
parent | 679bd2a0a43ed5de42988e7f31c768f7f15ad9ef (diff) | |
download | drakx-distro/mdv2008.1.tar drakx-distro/mdv2008.1.tar.gz drakx-distro/mdv2008.1.tar.bz2 drakx-distro/mdv2008.1.tar.xz drakx-distro/mdv2008.1.zip |
run_program: set XAUTHORITY and HOME for the user we will drop privileges todistro/mdv2008.1
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/Makefile.config | 2 | ||||
-rw-r--r-- | perl-install/NEWS | 4 | ||||
-rw-r--r-- | perl-install/run_program.pm | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/perl-install/Makefile.config b/perl-install/Makefile.config index ab8d5db5f..57f8644e8 100644 --- a/perl-install/Makefile.config +++ b/perl-install/Makefile.config @@ -1,5 +1,5 @@ # -*- Makefile -*- -VERSION:=10.29.11 +VERSION:=10.29.12 SUDO = sudo TMPDIR = /tmp diff --git a/perl-install/NEWS b/perl-install/NEWS index 9ddd6fa03..7e1a2d714 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,7 @@ +Version 10.29.12 - 11 February 2010 + +- run_program: set XAUTHORITY and HOME for the user we will drop + privileges to - drakhelp: o fix firefox launch bug #29775 - diskdrake: diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm index 0f84b9087..a74935656 100644 --- a/perl-install/run_program.pm +++ b/perl-install/run_program.pm @@ -111,8 +111,11 @@ sub raw { } else { if ($options->{setuid}) { require POSIX; - $ENV{'LOGNAME'} = getpwuid($options->{setuid}) || $ENV{LOGNAME}; POSIX::setuid($options->{setuid}); + my ($logname, $home) = (getpwuid($options->{setuid}))[0,7]; + $ENV{'XAUTHORITY'} = "$home/.Xauthority"; + $ENV{'LOGNAME'} = $logname || $ENV{LOGNAME}; + $ENV{'HOME'} = $home; } sub die_exit { |