]> git.ipfire.org Git - thirdparty/coreutils.git/commit
copy: fix SELinux context preservation for existing directories
authorPádraig Brady <P@draigBrady.com>
Thu, 2 Jan 2014 16:40:58 +0000 (16:40 +0000)
committerPádraig Brady <P@draigBrady.com>
Mon, 13 Jan 2014 12:52:26 +0000 (12:52 +0000)
commit243128dbf0293be7b170dd47c8dbf3ed1834c093
tree55b105c10b08539b90491398275c7f62c35f130e
parent5d7591d0edf0dd31c2daa195ee766c1383b89f4c
copy: fix SELinux context preservation for existing directories

* src/copy.c (copy_internal): Use the global process context
to set the context of existing directories before they're populated.
This is more consistent with the new directory case, and fixes
a bug for existing directories where we erroneously set the
context to the last copied descendent, rather than to that of
the source directory itself.
* tests/cp/cp-a-selinux.sh: Add a test for this case.
* NEWS: Mention the fix.
* THANKS.in: Add reporter Michal Trunecka.
NEWS
THANKS.in
src/copy.c
tests/cp/cp-a-selinux.sh