From: Wayne Davison Date: Thu, 14 Jun 2018 22:19:34 +0000 (-0700) Subject: Need to mark xattr rules in get_rule_prefix(). X-Git-Tag: v3.2.0pre1~231 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1eb7a7061af2f91149233937f3db066d303c7684;p=thirdparty%2Frsync.git 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). --- 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';