[Bug 8659] New: link-by-hash.diff: Fix error when running without --link-by-hash

samba-bugs at samba.org samba-bugs at samba.org
Tue Dec 13 20:47:11 MST 2011


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 at samba.org
        ReportedBy: chris at onthe.net.au
         QAContact: rsync-qa at 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.


More information about the rsync mailing list