NO_SYMLINK_XATTRS needs to be defined on Linux. See:
It would be nice to have a portable configure test rather than hard-coding the value for each OS. Unfortunately, the test may need to use the abstraction layer in lib/sysxattrs.c, which would not be available at configure time without special tricks.
Fixing typo in summary.
Yeah, it would be nice to figure this out instead of hard-wiring it, but we'll just hard-wire it for now.
Eventually rsync may need to behave differently depending on the filesystem, but we won't worry about that yet.
Since the read function doesn't generate an error, it shouod be fine to just let any attempt to set user xattrs on a symlink generate an error. Is there anything I'm missing?
(In reply to comment #3)
> Since the read function doesn't generate an error, it shouod be fine to just
> let any attempt to set user xattrs on a symlink generate an error. Is there
> anything I'm missing?
Yes: bug 7110. NO_SYMLINK_XATTRS is needed to trigger the code path that converts the symlink to a regular file to be able to set the fake-super xattr. Without it, rsync will try to set the xattr on the symlink, generating an EPERM which is swallowed by a test you apparently wrote to allow fake-super to work on a best-effort basis before the introduction of the NO_SYMLINK_XATTRS switch.
So, you can either detect the EPERM and convert the symlink to a regular file then, or have a separate NO_SYMLINK_USER_XATTRS switch. But either way, the EPERM test should go now that it is masking a failure that rsync is supposed to be able to avoid.
Will be fixed in 3.1.0.
do_readlink needs to use the same condition as do_symlink.
Thanks -- I missed the other 2 #if changes. Fixed now.