diff options
author | Torsten Veller <tove@gentoo.org> | 2009-05-29 13:26:29 +0000 |
---|---|---|
committer | Torsten Veller <tove@gentoo.org> | 2009-05-29 13:26:29 +0000 |
commit | 4286c0c51e36fad4bdfdee95412adb1d1db3b132 (patch) | |
tree | 96a7169be68fa2e9a2989cca69ab04d07cd22a06 /dev-lang/perl | |
parent | Remove vulnerable ebuilds as per bug #271676. If you needed one of these, the... (diff) | |
download | gentoo-2-4286c0c51e36fad4bdfdee95412adb1d1db3b132.tar.gz gentoo-2-4286c0c51e36fad4bdfdee95412adb1d1db3b132.tar.bz2 gentoo-2-4286c0c51e36fad4bdfdee95412adb1d1db3b132.zip |
Add another File-Path fix
(Portage version: 2.2_rc33/cvs/Linux i686)
Diffstat (limited to 'dev-lang/perl')
-rw-r--r-- | dev-lang/perl/ChangeLog | 6 | ||||
-rw-r--r-- | dev-lang/perl/files/perl-5.8.8-fix_file_path_chdir.patch | 72 | ||||
-rw-r--r-- | dev-lang/perl/perl-5.8.8-r6.ebuild | 3 | ||||
-rw-r--r-- | dev-lang/perl/perl-5.8.8-r7.ebuild | 3 |
4 files changed, 81 insertions, 3 deletions
diff --git a/dev-lang/perl/ChangeLog b/dev-lang/perl/ChangeLog index 811e7a35a29e..37f4a7c39107 100644 --- a/dev-lang/perl/ChangeLog +++ b/dev-lang/perl/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-lang/perl # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/ChangeLog,v 1.281 2009/05/27 08:39:04 tove Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/ChangeLog,v 1.282 2009/05/29 13:26:28 tove Exp $ + + 29 May 2009; Torsten Veller <tove@gentoo.org> perl-5.8.8-r6.ebuild, + perl-5.8.8-r7.ebuild, +files/perl-5.8.8-fix_file_path_chdir.patch: + Add another File-Path fix 27 May 2009; Torsten Veller <tove@gentoo.org> -perl-5.8.8-r2.ebuild, -perl-5.8.8-r3.ebuild, -perl-5.8.8-r4.ebuild: diff --git a/dev-lang/perl/files/perl-5.8.8-fix_file_path_chdir.patch b/dev-lang/perl/files/perl-5.8.8-fix_file_path_chdir.patch new file mode 100644 index 000000000000..c75aa89369a8 --- /dev/null +++ b/dev-lang/perl/files/perl-5.8.8-fix_file_path_chdir.patch @@ -0,0 +1,72 @@ +ExtUtils/Command.pm (among other things) expects to be able to destroy +a strangely-permissioned testdir. This is a backport of the chdir/chmod +work performed in File::Path released in Perl 5.10.0. + +--- perl-5.8.7.orig/lib/File/Path.pm 2008-12-05 13:23:32.000000000 -0800 ++++ perl-5.8.7/lib/File/Path.pm 2008-12-05 13:33:13.000000000 -0800 +@@ -162,7 +162,7 @@ + { + my ($path, $prefix, $up, $up_dev, $up_ino, $verbose, $safe) = @_; + +- my ($dev, $ino) = lstat $path or return 0; ++ my ($dev, $ino, $perm) = lstat $path or return 0; + unless (-d _) + { + print "unlink $prefix$path\n" if $verbose; +@@ -175,15 +175,25 @@ + return 1; + } + +- unless (chdir $path) +- { ++ if (!chdir($path)) { ++ # see if we can escalate privileges to get in ++ # (e.g. funny protection mask such as -w- instead of rwx) ++ $perm &= 07777; ++ my $nperm = $perm | 0700; ++ if (!($safe or $nperm == $perm or chmod($nperm, $path))) { ++ carp "cannot make $prefix$path read-write-exec"; ++ return 0; ++ } ++ elsif (!chdir($path)) { + carp "Can't chdir to $prefix$path ($!)"; + return 0; ++ } + } + + # avoid a race condition where a directory may be replaced by a + # symlink between the lstat and the chdir +- my ($new_dev, $new_ino, $perm) = stat '.'; ++ my ($new_dev, $new_ino); ++ ($new_dev, $new_ino, $perm) = stat '.'; + unless ("$new_dev:$new_ino" eq "$dev:$ino") + { + croak "Directory $prefix$path changed before chdir, aborting"; +--- perl-5.8.8.orig/lib/ExtUtils/t/Command.t ++++ perl-5.8.8/lib/ExtUtils/t/Command.t +@@ -23,7 +23,7 @@ + } + + BEGIN { +- use Test::More tests => 38; ++ use Test::More tests => 39; + use File::Spec; + } + +@@ -148,7 +148,7 @@ + $^O eq 'NetWare' || $^O eq 'dos' || $^O eq 'cygwin' || + $^O eq 'MacOS' + ) { +- skip( "different file permission semantics on $^O", 4); ++ skip( "different file permission semantics on $^O", 5); + } + + @ARGV = ('testdir'); +@@ -178,6 +178,7 @@ + + @ARGV = ('testdir'); + rm_rf; ++ ok( ! -e 'testdir', 'rm_rf can delete a read-only dir' ); + } + + diff --git a/dev-lang/perl/perl-5.8.8-r6.ebuild b/dev-lang/perl/perl-5.8.8-r6.ebuild index 0f6d73dd8507..e69aac5432ea 100644 --- a/dev-lang/perl/perl-5.8.8-r6.ebuild +++ b/dev-lang/perl/perl-5.8.8-r6.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/perl-5.8.8-r6.ebuild,v 1.4 2009/05/08 05:46:34 tove Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/perl-5.8.8-r6.ebuild,v 1.5 2009/05/29 13:26:28 tove Exp $ inherit eutils flag-o-matic toolchain-funcs multilib @@ -158,6 +158,7 @@ src_unpack() { epatch "${FILESDIR}"/${P}-CVE-2008-1927.patch epatch "${FILESDIR}"/${P}-CAN-2005-0448-rmtree-2.patch + epatch "${FILESDIR}"/${P}-fix_file_path_chdir.patch } myconf() { diff --git a/dev-lang/perl/perl-5.8.8-r7.ebuild b/dev-lang/perl/perl-5.8.8-r7.ebuild index cc6d9ca2cadc..d34f67b02289 100644 --- a/dev-lang/perl/perl-5.8.8-r7.ebuild +++ b/dev-lang/perl/perl-5.8.8-r7.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/perl-5.8.8-r7.ebuild,v 1.1 2009/05/27 08:34:48 tove Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/perl-5.8.8-r7.ebuild,v 1.2 2009/05/29 13:26:28 tove Exp $ inherit eutils flag-o-matic toolchain-funcs multilib @@ -161,6 +161,7 @@ src_unpack() { epatch "${FILESDIR}"/${P}-CVE-2008-1927.patch epatch "${FILESDIR}"/${P}-CAN-2005-0448-rmtree-2.patch + epatch "${FILESDIR}"/${P}-fix_file_path_chdir.patch } myconf() { |