diff options
author | Wayne Davison <wayned@samba.org> | 2008-07-14 23:48:33 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2008-07-14 23:48:33 -0700 |
commit | 97dde6b6200aa0a3333e4f821e24dd5f0f91ec75 (patch) | |
tree | 8011a167f1215c1d55d1137ad214275ac8361295 /xattrs.c | |
parent | 75d96978691e1c2c197ebb474f14aeb8cae8f9ad (diff) | |
download | android_external_rsync-97dde6b6200aa0a3333e4f821e24dd5f0f91ec75.tar.gz android_external_rsync-97dde6b6200aa0a3333e4f821e24dd5f0f91ec75.tar.bz2 android_external_rsync-97dde6b6200aa0a3333e4f821e24dd5f0f91ec75.zip |
A couple xattr fixes for --fake-super.
Diffstat (limited to 'xattrs.c')
-rw-r--r-- | xattrs.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -294,7 +294,7 @@ int copy_xattrs(const char *source, const char *dest) size_t datum_len; char *name, *ptr; #ifdef HAVE_LINUX_XATTRS - int user_only = am_sender ? 0 : !am_root; + int user_only = am_sender ? 0 : am_root <= 0; #endif /* This puts the name list into the "namebuf" buffer. */ @@ -745,6 +745,9 @@ static int rsync_xal_set(const char *fname, item_list *xalp, ssize_t list_len; size_t i, len; char *name, *ptr, sum[MAX_DIGEST_LEN]; +#ifdef HAVE_LINUX_XATTRS + int user_only = am_root <= 0; +#endif size_t name_len; int ret = 0; @@ -820,8 +823,8 @@ static int rsync_xal_set(const char *fname, item_list *xalp, #ifdef HAVE_LINUX_XATTRS /* We always ignore the system namespace, and non-root * ignores everything but the user namespace. */ - if (am_root ? HAS_PREFIX(name, SYSTEM_PREFIX) - : !HAS_PREFIX(name, USER_PREFIX)) + if (user_only ? !HAS_PREFIX(name, USER_PREFIX) + : HAS_PREFIX(name, SYSTEM_PREFIX)) continue; #endif if (am_root < 0 && name_len > RPRE_LEN |