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

           Summary: do_lchown() after set_xattr() causes xattrs to be
                    dropped on Linux 3.10.20.
           Product: rsync
           Version: 3.1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]


Created attachment 9489
  --> https://bugzilla.samba.org/attachment.cgi?id=9489
Candidate patch on rsync 3.1.0.  Please review.

Example:

    rsync -Xa /foo /bar

Expected:

    Copies will have the same security attributes as the originals.

Reality:

    Copies have security attributes cleared.

Please look at rsync-3.1.0/rsync.c lines 492 & 541 in the context of
chown_common() from linux kernel fs/open.c around the 500th line.  It appears
that the SET{G,U}ID bits and security attrs are cleared.

Relevant kernel line:

        if (!S_ISDIR(inode->i_mode))
                newattrs.ia_valid |=
                        ATTR_KILL_SUID | ATTR_KILL_SGID | ATTR_KILL_PRIV;


Suggestion: move the SUPPORT_XATTRS code invocation after the if (change_uid...
block.

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to