samba-bugs at samba.org
2018-Jun-10 10:28 UTC
[Bug 13467] New: an xattr filter rule is treated as a file filter rule on the remote side
https://bugzilla.samba.org/show_bug.cgi?id=13467
Bug ID: 13467
Summary: an xattr filter rule is treated as a file filter rule
on the remote side
Product: rsync
Version: 3.1.3
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P5
Component: core
Assignee: wayned at samba.org
Reporter: andras at nagya.net
QA Contact: rsync-qa at samba.org
This bug was previously reported on the rsync mailing list,
https://lists.samba.org/archive/rsync/2018-April/031626.html . This version of
the report has a slightly more detailed repro, and was produced on Linux.
The bug manifests if an xattr filter rule is being used; however the repro does
not require actual xattrs to be present, so the bug can be reproduced even if
the file system being used does not support xattrs.
Prerequisites for the repros:
- ssh service running on localhost
- mkdir /tmp/{a,b}
- touch /tmp/a/1 /tmp/b/{1,2}
Repro #1, sender is local:
$ rsync --filter='-x! user.*' -avvvHX --delete /tmp/a/. localhost:/tmp/b
Result:
- output: [Receiver] add_rule(-! user.*)
- output: [generator] protecting file 2 because of pattern user.*
- output: [generator] protecting file 1 because of pattern user.*
- expected: /tmp/b/2 is deleted, actual: not deleted
Repro #2, sender is remote:
$ rsync --filter='-x! user.*' -avvvHX --delete localhost:/tmp/b/. /tmp/a
Result:
- output: [sender] add_rule(-! user.*)
- output: [sender] hiding file 2 because of pattern user.*
- output: [sender] hiding file 1 because of pattern user.*
- output: deleting 1
- expected: /tmp/a/1 is not deleted, actual: is deleted
- expected: /tmp/a/2 is created, actual: not created
The results are consistent with the theory that the xattr filter rule is
mangled during transfer, resulting in an incorrect (-! user.*) filter rule on
the remote side, that matches all remote files.
In the more general case, the bug causes rather destructive behavior: if the
sender is remote (like in repro #2), all local files are deleted.
Enviroment: Arch Linux, Kernel 4.15.13, package
https://www.archlinux.org/packages/extra/x86_64/rsync/
rsync version 3.1.3 protocol version 31
Capabilities:
64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, iconv, symtimes, prealloc
--
You are receiving this mail because:
You are the QA Contact for the bug.
samba-bugs at samba.org
2018-Nov-20 22:31 UTC
[Bug 13467] an xattr filter rule is treated as a file filter rule on the remote side
https://bugzilla.samba.org/show_bug.cgi?id=13467
Wayne Davison <wayned at samba.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from Wayne Davison <wayned at samba.org> ---
This was fixed in git a little while back.
--
You are receiving this mail because:
You are the QA Contact for the bug.
Maybe Matching Threads
- bug: xattr filter rule treated as file filter rule on the remote side
- Bug#306368: filter rules are too modern for remote rsync (which is 2.5.6)
- protect rule prevents file sending when in merge filter file?
- [ycui1@bloomberg.com: Re: rsync bug?? (rsync fails when -C is used).]
- Error 11: can not backup /var/lib/zope2.9