aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-05 14:35:22 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-05 14:35:22 +0000
commit1f50219439b49adc323d5d00ffc606861e6174fe (patch)
tree708f09245544645df392a1764140dd20c92ec8ad
parent38006d6a1a74f31fe85f3c25aae304b0741aae93 (diff)
downloadpaludis-1f50219439b49adc323d5d00ffc606861e6174fe.tar.gz
paludis-1f50219439b49adc323d5d00ffc606861e6174fe.tar.xz
security.selinux xattr is special
-rw-r--r--paludis/fs_merger.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/paludis/fs_merger.cc b/paludis/fs_merger.cc
index e8bba16..6aa3f54 100644
--- a/paludis/fs_merger.cc
+++ b/paludis/fs_merger.cc
@@ -795,6 +795,13 @@ FSMerger::try_to_copy_xattrs(const FSPath & src, int dst_fd, FSMergerStatusFlags
}
std::shared_ptr<char> value_holder(static_cast<char *>(::operator new(value_sz)));
+
+ if (key == "security.selinux")
+ {
+ /* we handle selinux stuff specially */
+ continue;
+ }
+
value_sz = fgetxattr(src_fd, key.c_str(), value_holder.get(), value_sz);
if (-1 == value_sz)
{
@@ -808,8 +815,9 @@ FSMerger::try_to_copy_xattrs(const FSPath & src, int dst_fd, FSMergerStatusFlags
if (ENOTSUP == errno)
{
Log::get_instance()->message("merger.xattrs.failure", ll_warning, lc_context) <<
- "Could not copy extended attributes from source file '" << src << "'";
- return;
+ "Could not copy extended attributes from source file '" << src << "', discarding attribute '" <<
+ key << "' = '" << std::string(value_holder.get(), value_sz) << "'";
+ continue;
}
else
Log::get_instance()->message("merger.xattrs.failure", ll_warning, lc_context) <<