Bug 10496 - --itemize-changes always reports xattr changes with --xattrs --fake-super
Summary: --itemize-changes always reports xattr changes with --xattrs --fake-super
Status: NEW
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.1
Hardware: All Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-14 03:05 UTC by Benjamin Gilbert
Modified: 2015-10-15 09:50 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Gilbert 2014-03-14 03:05:10 UTC
3.1.1pre1 on RHEL 6.5.

The combination of --itemize-changes --xattrs --fake-super causes a ".f........x" or ".d........x" line to be printed for every unmodified file or directory in the transfer:

$ mkdir a
$ touch a/1 a/2 a/3
$ rsync -rtiX --fake-super a/ b                   
cd+++++++++ ./
>f+++++++++ 1 
>f+++++++++ 2 
>f+++++++++ 3
$ rsync -rtiX --fake-super a/ b                   
.d........x ./
.f........x 1 
.f........x 2 
.f........x 3
Comment 1 Kevin Korb 2014-03-14 07:33:09 UTC
It works for me.

Can you verify if it is actually setting the extended attributes with getfattr?  If not then you probably need the user_xattr mount option.
Comment 2 Benjamin Gilbert 2014-03-14 21:51:17 UTC
Yes, it is:

$ getfattr -d -m - b/1
# file: b/1
security.selinux="unconfined_u:object_r:user_home_t:s0"
user.rsync.%stat="100664 0,0 0:0"
user.rsync.security.selinux="unconfined_u:object_r:user_home_t:s0"

The problem seems to be SELinux-related: I can reproduce this on Fedora 20 with SELinux enabled (enforcing or permissive), and SELinux is enabled (enforcing) on the RHEL 6 system.  On Fedora 20 with SELinux disabled, the problem does not occur.
Comment 3 Kevin Korb 2014-03-14 21:54:00 UTC
That makes sense.  I was testing on Gentoo without any SELinux.