diff options
author | 2011-03-05 14:35:22 +0000 | |
---|---|---|
committer | 2011-03-05 14:35:22 +0000 | |
commit | 1f50219439b49adc323d5d00ffc606861e6174fe (patch) | |
tree | 708f09245544645df392a1764140dd20c92ec8ad | |
parent | 38006d6a1a74f31fe85f3c25aae304b0741aae93 (diff) | |
download | paludis-1f50219439b49adc323d5d00ffc606861e6174fe.tar.gz paludis-1f50219439b49adc323d5d00ffc606861e6174fe.tar.xz |
security.selinux xattr is special
-rw-r--r-- | paludis/fs_merger.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/paludis/fs_merger.cc b/paludis/fs_merger.cc index e8bba1658..6aa3f5411 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) << |