perl/perl-5.10.0-fix_file_path_rmtree_setuid.patch

13 lines
707 B
Diff

diff -up perl-5.10.0/lib/File/Path.pm.BAD perl-5.10.0/lib/File/Path.pm
--- perl-5.10.0/lib/File/Path.pm.BAD 2009-03-11 17:54:57.000000000 -0400
+++ perl-5.10.0/lib/File/Path.pm 2009-03-11 17:55:32.000000000 -0400
@@ -333,7 +333,7 @@ sub _rmtree {
}
else {
_error($arg, "cannot remove directory", $canon);
- if (!chmod($perm, ($Is_VMS ? VMS::Filespec::fileify($root) : $root))
+ if ($Force_Writeable && !chmod($perm, ($Is_VMS ? VMS::Filespec::fileify($root) : $root))
) {
_error($arg, sprintf("cannot restore permissions to 0%o",$perm), $canon);
}