This patch will make rsync 3.0.x able to exchange ACLs with an older
[rsync/rsync-patches.git] / xattrs.diff
index e8a53f7..d2b4533 100644 (file)
@@ -564,7 +564,7 @@ TODO:
  transfer.  The resulting value is treated as though it was the permissions
 --- old/xattr.c
 +++ new/xattr.c
-@@ -0,0 +1,451 @@
+@@ -0,0 +1,459 @@
 +/*
 + * Extended Attribute support for rsync.
 + * Written by Jay Fenlason, vaguely based on the ACLs patch.
@@ -979,6 +979,14 @@ TODO:
 +              name_len = strlen(name) + 1;
 +              list_len -= name_len;
 +
++#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))
++                      continue;
++#endif
++
 +              for (i = 0; i < xalp->count; i++) {
 +                      if (strcmp(name, rxas[i].name) == 0)
 +                              break;