aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-09-30 14:04:22 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-09-30 14:04:22 +0000
commite482e21f6255ea558fe6bf7aae62f45e973b0c3c (patch)
treec677944629daf0bca45c0734869211ecd3c969b3
parent1d8305349363cadd4046da7bdc14d752f427b50a (diff)
downloadrpmtools-e482e21f6255ea558fe6bf7aae62f45e973b0c3c.tar
rpmtools-e482e21f6255ea558fe6bf7aae62f45e973b0c3c.tar.gz
rpmtools-e482e21f6255ea558fe6bf7aae62f45e973b0c3c.tar.bz2
rpmtools-e482e21f6255ea558fe6bf7aae62f45e973b0c3c.tar.xz
rpmtools-e482e21f6255ea558fe6bf7aae62f45e973b0c3c.zip
Safety check: make sur temporary directory is owned by user
-rw-r--r--genhdlist3
1 files changed, 3 insertions, 0 deletions
diff --git a/genhdlist b/genhdlist
index 871d919..61ed645 100644
--- a/genhdlist
+++ b/genhdlist
@@ -55,6 +55,9 @@ my @dir = @ARGV ? @ARGV : (".");
grep { m!^/! } @dir and die "Directories to parse should be relative\n";
$dest and do { chdir $dest or die "Can't chdir in directory $dest\n" };
+
+-o $tmpdir or
+ die "$tmpdir is not owned by you, bailing out\n";
rmtree($tmpdir) unless $noclean;
mkpath($tmpdir);