[Bug 8201] rsync 3.0.8 destroys SELinux security context of symbolic links

samba-bugs at samba.org samba-bugs at samba.org
Tue Jun 7 18:01:42 MDT 2011


https://bugzilla.samba.org/show_bug.cgi?id=8201

--- Comment #5 from Matt McCutchen <matt at mattmccutchen.net> 2011-06-08 00:01:41 UTC ---
(In reply to comment #4)
> IMHO NO_SYMLINK_XATTRS doesn't have the right semantics.

I assume you mean "a new NO_SYMLINK_XATTRS-like switch that applies only to the
user namespace" like I did.

> Under Linux, trying to
> read

No, reading is fine; there just will never be any user xattrs.

> or set a "user" attribute on a symlink will raise EPERM. The Right Thing
> to do for rsync would be to ignore this specific type of error.

For setting, I disagree.  The data loss compared to the source constitutes an
error.

> That's not what
> NO_SYMLINK_XATTRS does, AFAICS.

NO_SYMLINK_XATTRS causes symlink xattr reads and writes to return the empty set
and ENOTSUP, respectively, without calling the OS.  On Linux, this is just an
optimization unless you care about the difference in the error code.  It's
conceivable that another OS might return an error on reads, in which case rsync
would not want to pass that error along.

The more significant effect of NO_SYMLINK_XATTRS is to tell the fake-super mode
to store symlinks as regular files so it can attach the fake-super xattr.  If
rsync waited to get EPERM on the symlink, it would have to go back and replace
the symlink with a regular file.

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the rsync mailing list