aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2018-06-14 15:19:34 -0700
committerWayne Davison <wayned@samba.org>2018-06-14 15:22:53 -0700
commit1eb7a7061af2f91149233937f3db066d303c7684 (patch)
tree79c52eac9c0f51f546bae6769c492a78b00a84ff
parenteec6ab7615535e02cfcb691d44575268bdcf656f (diff)
downloadandroid_external_rsync-1eb7a7061af2f91149233937f3db066d303c7684.tar.gz
android_external_rsync-1eb7a7061af2f91149233937f3db066d303c7684.tar.bz2
android_external_rsync-1eb7a7061af2f91149233937f3db066d303c7684.zip
Need to mark xattr rules in get_rule_prefix().
This fixes the bug of xattr filters getting sent as a normal filter rule (since the 'x' was dropped in the prefix).
-rw-r--r--NEWS2
-rw-r--r--exclude.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 792df231..1bcdba72 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ Changes since 3.1.3:
BUG FIXES:
+ - Fix xattr filter rules losing an 'x' attribute in a non-local transfer.
+
- Fix a compiler error/warning about shifting a negative value (in the zlib
code).
diff --git a/exclude.c b/exclude.c
index 7989fb3e..a0090b29 100644
--- a/exclude.c
+++ b/exclude.c
@@ -1286,6 +1286,8 @@ char *get_rule_prefix(filter_rule *rule, const char *pat, int for_xfer,
}
if (rule->rflags & FILTRULE_EXCLUDE_SELF)
*op++ = 'e';
+ if (rule->rflags & FILTRULE_XATTR)
+ *op++ = 'x';
if (rule->rflags & FILTRULE_SENDER_SIDE
&& (!for_xfer || protocol_version >= 29))
*op++ = 's';