samba-bugs@samba.org
2007-Oct-26  01:17 UTC
DO NOT REPLY [Bug 5043] New: Qualified non-inherited filter rules may be ignored
https://bugzilla.samba.org/show_bug.cgi?id=5043
           Summary: Qualified non-inherited filter rules may be ignored
           Product: rsync
           Version: 2.6.9
          Platform: x64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: core
        AssignedTo: wayned@samba.org
        ReportedBy: wolfgang.mayer@unisa.edu.au
         QAContact: rsync-qa@samba.org
It seems that under certain conditions, local filter rules where the
pattern is anchored with '/' to prevent rule propagation to
sub-directories
leads to these rules being dropped entirely.
The following simplified example demonstrates the problem:
$ TESTDIR=/tmp/rsync-test
$ mkdir -p $TESTDIR/{root/{a/b,b/a/c},dst}
$ echo "- /a" > $TESTDIR/root/.rsync-filter
The following fails to exclude $TESTDIR/root/a, despite the per-directory
filter rule stating that sub-directory 'a' should not be considered:
$ cd $TESTDIR/dst
$ rsync -avvFFR $TESTDIR/root/ $TESTDIR/dst/
sending incremental file list
[sender] hiding file /tmp/rsync-test/root/.rsync-filter because of pattern
.rsync-filter
delta-transmission disabled for local transfer or --whole-file
/tmp/
/tmp/rsync-test/
/tmp/rsync-test/root/
/tmp/rsync-test/root/a/
/tmp/rsync-test/root/a/b/
/tmp/rsync-test/root/b/
/tmp/rsync-test/root/b/a/
/tmp/rsync-test/root/b/a/c/
total: matches=0  hash_hits=0  false_alarms=0 data=0
Running rsync without '-R' works as expected, and changing into a
directory
above $TESTDIR/root and using the relative path to $TESTDIR/root also seems
to work without problems.
We're running rsync version 2.6.9 protocol version 29, on Fedora7/x86_64
and CentOS5/{i686,x86_64}. The same behaviour appears in the latest version
from CVS [3.0.0pre2  protocol version 30.PR12].
-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
samba-bugs@samba.org
2007-Oct-26  02:07 UTC
DO NOT REPLY [Bug 5043] Qualified non-inherited filter rules may be ignored
https://bugzilla.samba.org/show_bug.cgi?id=5043 ------- Comment #1 from hashproduct+rsync@gmail.com 2007-10-25 21:07 CST ------- I can reproduce the problem in the latest CVS rsync. The problem appears to be that in rule_matches, rsync prepends an extra copy of the working directory to the rule pattern because the "name++;" on line 531 of exclude.c controverts the "*name != '/'" test on line 541. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs@samba.org
2007-Oct-26  16:58 UTC
DO NOT REPLY [Bug 5043] Qualified non-inherited filter rules may be ignored
https://bugzilla.samba.org/show_bug.cgi?id=5043
wayned@samba.org changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
------- Comment #2 from wayned@samba.org  2007-10-26 11:58 CST -------
Thanks for the analysis, Matt.  I've fixed the bug in CVS.
I verified the fix using your test case, Wolfgang, so thanks for the detailed
report!
-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.