summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-08-21 14:19:05 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-08-21 14:19:05 +0000
commitb3c2d8a8073aa68a7cc16a919c522c69067f4351 (patch)
tree5485ba9835c628186ae86b6e12cbac4149626c1c /perl-install
parentf98aa287d37918c9d8ff9220459a0c6305adde37 (diff)
downloaddrakx-b3c2d8a8073aa68a7cc16a919c522c69067f4351.tar
drakx-b3c2d8a8073aa68a7cc16a919c522c69067f4351.tar.gz
drakx-b3c2d8a8073aa68a7cc16a919c522c69067f4351.tar.bz2
drakx-b3c2d8a8073aa68a7cc16a919c522c69067f4351.tar.xz
drakx-b3c2d8a8073aa68a7cc16a919c522c69067f4351.zip
- use $TMPDIR before using $HOME/tmp
- if $HOME doesn't exist, it will use /tmp which is safe when using secured_file()
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfig/test.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/Xconfig/test.pm b/perl-install/Xconfig/test.pm
index 777066420..94ce62d17 100644
--- a/perl-install/Xconfig/test.pm
+++ b/perl-install/Xconfig/test.pm
@@ -49,8 +49,8 @@ sub test {
my $f = $::testing ? $tmpconfig : "/etc/X11/XF86Config.test";
$raw_X->{Xconfig::card::using_xf4($card) ? 'xfree4' : 'xfree3'}->write("$::prefix/$f");
- $ENV{HOME} || $::isInstall or die q($HOME is unset, so I don't know where to put my temporary files);
- my $f_err = "$::prefix$ENV{HOME}/tmp/.drakx.Xoutput";
+ my $f_err = secured_file($::prefix . ($ENV{TMPDIR} || "$ENV{HOME}/tmp") . '/.drakx.Xoutput');
+
my $pid;
unless ($pid = fork()) {
system("xauth add :9 . `mcookie`");