+@@ -263,7 +279,10 @@ void send_xattr(statx *sxp, int f)
+ #else
+ /* We strip the rsync prefix from disguised namespaces
+ * and put everything else in the user namespace. */
+- if (HAS_PREFIX(rxa->name, RSYNC_PREFIX)) {
++ if (HAS_PREFIX(rxa->name, RSYNC_PREFIX)
++ && (am_root < 0 || rxa->name_len != XSTAT_LEN + 1
++ || rxa->name[CENT_POS] != '%'
++ || strcmp(rxa->name, XSTAT_ATTR) != 0)) {
+ write_int(f, rxa->name_len - RPRE_LEN);
+ write_int(f, rxa->datum_len);
+ write_buf(f, rxa->name + RPRE_LEN, rxa->name_len - RPRE_LEN);
+@@ -298,10 +317,8 @@ void receive_xattr(struct file_struct *f