Wayne Davison [Sun, 24 Jan 2016 19:12:38 +0000 (11:12 -0800)]
Add support for comparing nanoseconds on the receiver.
This patch adds the ability to specify --modify-window=-1 (aka -@-1) to
ask rsync to compare files with the full nanosecond timestamps. The
default is still -@0 for the moment, which ignores nanoseconds in time
comparisons. Changing the default to -1 would cause a copy from ext4 to
ext3 to constantly compare as different, or a copy there and back again
to do a full copy as it zeroed all the nanosecond times. Such a change
might be too much of a functional difference for things like backup
solutions to handle without a warning period. The current plan is to
support nanosecond comparisons for those that want them, and possibly
change the default window value from 0 to -1 at some point in the
future.
Wayne Davison [Sat, 5 Dec 2015 19:10:24 +0000 (11:10 -0800)]
Fix return of stat info from try_dests_reg().
The try_dests_reg() function could sometimes tweak the stat struct's
info when it should have been left unchanged. This fixes bug 11545
(where an ACL check of a file that was mistakenly thought to be a
directory failed).
Wayne Davison [Mon, 7 Sep 2015 16:46:31 +0000 (09:46 -0700)]
Fixed logging of %b & %c when using --log-file.
The %b and %c escapes were outputting cumulative values when logged via
--log-file only (the bug didn't affect daemon transfer logging or the
output of the client's --out-format info). Also unified the %b & %c
switch case to make it easier to maintain. Fixes bug 11496.
Wayne Davison [Fri, 13 Jun 2014 22:58:26 +0000 (15:58 -0700)]
Fix hard-link bugs when receiver isn't capable.
If the receiving side cannot hard-link symlinks and/or special files
(including devices) then we now properly handle incoming hard-linked
items (creating separate identical items).
Wayne Davison [Sun, 8 Jun 2014 17:22:09 +0000 (10:22 -0700)]
Added a flag to disable xattr hlink optimization.
I added a compatibility flag for protocol 31 that will let both sides
know if they should be using the xattr optimization that attempted to
avoid sending xattr info for hardlinked files. Since this optimization
was causing some issues, this compatibility flag will ensure that both
sides know if they should be trying to use the optimization or not.
Wayne Davison [Sat, 19 Apr 2014 19:11:11 +0000 (12:11 -0700)]
Add new-style compression that skips matching data.
Adding new-style compression that only compresses the literal data that
is sent over the wire and not also matching file data that was not sent.
This new-style compression is compatible with external zlib instances,
and will eventually become the default (once enough time has passed that
all servers support the --new-compress and --old-compress options).
NOTE: if you build rsync with an external zlib (i.e. if you specified
configure --with-included-zlib=no) you will ONLY get support for the
--new-compress option! A client will treat -z as uncompressed (with a
warning) and a server will exit with an error (unless -zz was used).
Wayne Davison [Sun, 13 Apr 2014 17:36:59 +0000 (10:36 -0700)]
Receiver now rejects invalid filenames in filelist.
If the receiver gets a filename with a leading slash (w/o --relative)
and/or a filename with an embedded ".." dir in the path, it dies with
an error (rather than continuing). Those invalid paths should never
happen in reality, so just reject someone trying to pull a fast one.
Wayne Davison [Mon, 3 Mar 2014 00:37:44 +0000 (16:37 -0800)]
Have receiver strip bogus leading slashes on filenames.
If the receiver is running without --relative, it shouldn't be receiving
any filenames with a leading slash. To ensure that the sender doesn't
try to pull a fast one on us, we now make flist_sort_and_clean() strip a
leading slash even if --relative isn't specified.