aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2008-06-21 11:07:12 +0000
committerAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2008-06-22 12:06:06 +0000
commit7a6ac5296c51b61a16ed90eb4dc712f0ec3d00b3 (patch)
treee5afae7feed9c47b615bfe6c84ecb124cae5af29
parent084c79067beb2a83431d256997f15709f24f4772 (diff)
downloadpaludis-7a6ac5296c51b61a16ed90eb4dc712f0ec3d00b3.tar.gz
paludis-7a6ac5296c51b61a16ed90eb4dc712f0ec3d00b3.tar.xz
Unset permissions on entries that are going to be removed
-rw-r--r--paludis/merger.cc11
1 files changed, 1 insertions, 10 deletions
diff --git a/paludis/merger.cc b/paludis/merger.cc
index d9cf6b8..0713a27 100644
--- a/paludis/merger.cc
+++ b/paludis/merger.cc
@@ -1054,16 +1054,7 @@ Merger::unlink_file(FSEntry d)
Log::get_instance()->message("merger.unlink_file.pre_hooks.failure", ll_warning, lc_context) <<
"Unmerge of '" << d << "' pre hooks returned non-zero";
- if (d.is_regular_file())
- {
- mode_t mode(d.permissions());
- if ((mode & S_ISUID) || (mode & S_ISGID))
- {
- mode &= 0400;
- d.chmod(mode);
- }
- }
-
+ d.chmod(0);
d.unlink();
if (0 != _imp->params[k::environment()]->perform_hook(extend_hook(