I've found a(nother) bug with the xattr code:
kiwiw:~/x terpstra$ uname -a
Darwin kiwiw.lan 8.10.0 Darwin Kernel Version 8.10.0: Wed May 23 16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC Power Macintosh powerpc
kiwiw:~/x terpstra$ echo test > bar
kiwiw:~/x terpstra$ xattr --set broken demo bar
kiwiw:~/x terpstra$ chmod 0444 bar
kiwiw:~/x terpstra$ rsync-3.0 -aHAXSx bar pumpkin::staging/tmp/
rsync: rsync_xal_set: lsetxattr(".bar.E055QA","user.broken") failed: Permission denied (13) rsync: rsync_xal_set: lsetxattr (".bar.E055QA","user.com.apple.crtime96") failed: Permission denied (13) rsync error: some files could not be transferred (code 23) at main.c (1053) [sender=3.0.0pre2]
kiwiw:~/x terpstra$ mkdir y
kiwiw:~/x terpstra$ chmod 0555 y
kiwiw:~/x terpstra$ rsync-3.0 -aHAXSx y pumpkin::staging/tmp/
rsync: rsync_xal_set: lsetxattr("y","user.com.apple.crtime96") failed: Permission denied (13) rsync: rsync_xal_clear: lremovexattr("y","user.rsync.%stat") failed: Permission denied (13) rsync error: some files could not be transferred (code 23) at main.c (1053) [sender=3.0.0pre2]

I'm not sure when this bug was introduced (this wasn't a problem before 3.0), but the patch is obvious. You cannot write extended attributes to a read-only file (or directory). Rsync tried to do this (with fake-super enabled!) for all transmitted xattrs and also with the %stat fake-super attribute.

--
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