Protect device-table.pl realpath usage to allow relative directories.

git-svn-id: http://emdebian.org/svn/current@7861 563faec7-e20c-0410-992a-a66f704d0ccd
main
codehelp 14 years ago
parent 28cdf889b7
commit 849b2f560f

4
debian/changelog vendored

@ -6,8 +6,10 @@ multistrap (2.1.13) unstable; urgency=low
* Fix device-table.pl to use correct minor device number in * Fix device-table.pl to use correct minor device number in
iterative mode (Closes: #615819) iterative mode (Closes: #615819)
* Disable SecureApt if fakeroot is detected. * Disable SecureApt if fakeroot is detected.
* Protect device-table.pl realpath usage to allow relative
directories.
-- Neil Williams <codehelp@debian.org> Mon, 28 Feb 2011 09:17:33 +0000 -- Neil Williams <codehelp@debian.org> Mon, 28 Feb 2011 16:25:53 +0000
multistrap (2.1.12) unstable; urgency=low multistrap (2.1.12) unstable; urgency=low

@ -41,6 +41,13 @@ if ($e !~ /\nFAKEROOTKEY=[0-9]+\n/) {
} else { } else {
$fakeroot=""; $fakeroot="";
} }
# cope with people getting things wrong from local SVN (not a translated string).
if (dirname($0) ne "/usr/sbin/") {
print "checking realpath\n";
my $realpath = `which realpath`;
chomp ($realpath);
die ("ERR: Please install realpath.\n") if (not -x ($realpath));
}
while( @ARGV ) { while( @ARGV ) {
$_= shift( @ARGV ); $_= shift( @ARGV );
last if m/^--$/; last if m/^--$/;
@ -54,6 +61,8 @@ while( @ARGV ) {
$file = shift(@ARGV); $file = shift(@ARGV);
} elsif (/^(-d|--dir)$/) { } elsif (/^(-d|--dir)$/) {
$dir = shift(@ARGV); $dir = shift(@ARGV);
$dir = `realpath $dir`;
chomp($dir);
} elsif (/^(-n|--dry-run)$/) { } elsif (/^(-n|--dry-run)$/) {
$dry++; $dry++;
} elsif (/^(--no-fakeroot)$/) { } elsif (/^(--no-fakeroot)$/) {

Loading…
Cancel
Save