]> git.ipfire.org Git - thirdparty/coreutils.git/commit
mv,cp: preserve symlink xattrs when copying across file systems
authorPádraig Brady <P@draigBrady.com>
Fri, 2 May 2014 21:54:32 +0000 (22:54 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 6 May 2014 09:26:50 +0000 (10:26 +0100)
commit0b04ff22edcd7b75f0929f5bede7d814d100e2f1
tree387fabd741a3ac3bbb096ce6375c3bbc8dfcaa0c
parenta03a51c44c78d25e9fab2ffb9bb0a46f22969f4e
mv,cp: preserve symlink xattrs when copying across file systems

* src/copy.c (copy_internal): Include the copy_attr() call for symlinks.
This should not dereference symlinks, since llistxattr() is used
in attr_copy_file() in libattr, and so should copy all but the filtered
extended attributes.  Note we don't just move the copy_attr() call
before the set_owner() call, as that would break capabilities
for non symlinks.
* tests/cp/cp-mv-enotsup-xattr.sh: Add a test case.
* NEWS: Mention the bug fix.
Fixes http://bugs.gnu.org/16131
NEWS
src/copy.c
tests/cp/cp-mv-enotsup-xattr.sh