[Bug 13241] New: A problem with test for xattrs transfer

samba-bugs at samba.org samba-bugs at samba.org
Tue Jan 23 13:11:59 UTC 2018


            Bug ID: 13241
           Summary: A problem with test for xattrs transfer
           Product: rsync
           Version: 3.1.2
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
          Assignee: wayned at samba.org
          Reporter: mruprich at redhat.com
        QA Contact: rsync-qa at samba.org


when running tests for rsync on Fedora, it fails on the xattrs.test and
xattrs-hlink.test. It always fails on the line

rsync -aiX --fake-super --link-dest=../chk . ../to

with this result:

--- omitted ---
 user.dir1="need to test directory xattrs too"
 user.dir2="another xattr"
 user.dir3="this is one last one for the moment"
--- omitted ---

for basically every file. This only happens when the --fake-super option is on.
For instance line 

rsync-3.1.2/rsync  -aiX -H --super --link-dest=../chk . ../to 

is not affected. 

Looking at the xls() method in the test, it uses 'getfattr -d'. The original
files will never show the
user.rsync.security.selinux="unconfined_u:object_r:user_home_t:s0" with this
command. This attribute has to be specifically asked for with 'getfattr -n

Looking into the code the function sys_lgetxattr is used to get extended
attributes and it asks specifically for the security.selinux attribute. And
this attribute gets transferred to the destination file and is visible with
'getfattr -d'.

> mkdir dir_a dir_b
> echo "Hello world" > dir_a/foo.txt
> getfattr -d dir_a/foo.txt
> getfattr -n security.selinux dir_a/foo.txt
# file: dir_a/foo.txt
> rsync -aiX --fake-super dir_a/ dir_b/
> getfattr -d dir_b/foo.txt
# file: dir_b/foo.txt

As you can see rsync transfers this attribute and it is visible after issuing
'getfattr -d'. I'm not sure if this should happen but either the xattrs.txt
file used for the diff in the test should be edited or there is something wrong
with the --fake-super option combined with -X.

Thanks for any help on this.


You are receiving this mail because:
You are the QA Contact for the bug.

More information about the rsync mailing list