Bug 5474 - extended attributes only copy if ACLs are copied on a Mac
Summary: extended attributes only copy if ACLs are copied on a Mac
Status: CLOSED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.0.3
Hardware: x86 Other
: P3 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-19 03:56 UTC by psturdza
Modified: 2008-07-28 20:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description psturdza 2008-05-19 03:56:52 UTC
Same issue as reported by Smokin Jake to the email list on 6 April still happens with version 3.0.3pre2.
sudo rsync -avXH --fileflags --crtimes /Src/ /Dst/
does not copy extended attributes according to backup bouncer.  Adding -A to the argument list does result in the extended attributes being copied.

This is on a 64-bit Intel Mac, if that matters:
rsync  version 3.0.3pre2  protocol version 30
Copyright (C) 1996-2008 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 32-bit inums, 32-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, symtimes, file-flags
Comment 1 Wayne Davison 2008-05-24 11:47:50 UTC
A stock rsync works fine, but after applying the fileflags patch, the xattrs test in the test suite starts to fail.  The reason for this is that the get_xattrs() function has started to reject device and special files (due to a buggy errno return from xattr functions), but the st_mode value in the stat struct was not being set prior to the call in flist.c.

The fix is to add this line:

                        sx.st.st_mode = file->mode;

prior to the call of get_xattrs() in flist.c.  I'll make that fix in the git repository.