[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rsync
Subject:    [Bug 8659] New: link-by-hash.diff: Fix error when running without
From:       samba-bugs () samba ! org
Date:       2011-12-14 3:47:11
Message-ID: bug-8659-1042 () https ! bugzilla ! samba ! org/
[Download RAW message or body]

https://bugzilla.samba.org/show_bug.cgi?id=8659

           Summary: link-by-hash.diff: Fix error when running without
                    --link-by-hash
           Product: rsync
           Version: 3.1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
        AssignedTo: wayned@samba.org
        ReportedBy: chris@onthe.net.au
         QAContact: rsync-qa@samba.org


Created attachment 7178
  --> https://bugzilla.samba.org/attachment.cgi?id=7178
Fix error when running without --link-by-hash

Don't pass F_SUM(file) into receive_data() if not using --link-by-hash.

When running without --link-by-hash (and without --checksum), F_SUM(file)
isn't allocated. However this location was being unconditionally passed into
receive_data() which would then write into it, stamping on whatever happened
to be there.

The actual error seen depends on what exactly was getting stamped on, which
depends on the file list at the time, but on my box...

Unpatched:

$ mkdir -p /tmp/src.d/{a,b} /tmp/dst.d
$ echo foo > /tmp/src.d/a/a
$ ln /tmp/src.d/{a,b}/a

$ ./rsync -av /tmp/src.d /tmp/dst.d
sending incremental file list
src.d/
src.d/a/
src.d/a/a
src.d/b/
src.d/b/a
received request to transfer non-regular file: 8 [receiver]
rsync error: protocol incompatibility (code 2) at ../rsync/rsync.c(403)
[receiver=3.1.0dev]

Patched:

$ ./rsync -av /tmp/src.d /tmp/dst.d
sending incremental file list
src.d/
src.d/a/
src.d/a/a
src.d/b/
src.d/b/a

sent 228 bytes  received 70 bytes  596.00 bytes/sec
total size is 8  speedup is 0.03

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic