Wayne Davison [Mon, 16 Sep 2013 16:00:53 +0000 (09:00 -0700)]
Fix error in write_sparse() on incomplete write.
Fix a problem where sparse_seek could get left non-zero when we
did not finish writing all the data that would take us to that
sparse gap. Issue pointed out by David Taylor.
Wayne Davison [Sat, 3 Aug 2013 16:44:13 +0000 (09:44 -0700)]
Remove bypassed checksums in --inplace to improve speed.
When checking a checksum that refers to a part of an --inplace file that
has been overwritten w/o getting SUMFLG_SAME_OFFSET set, we remove the
checksum from the list. This will speed up files that have a lot of
identical checksum blocks (e.g. sequences of zeros) that we can't use
due to them not getting marked as being the same. Patch provided by
Michael Chapman.
Wayne Davison [Sat, 15 Jun 2013 21:40:52 +0000 (14:40 -0700)]
Support rsync daemon over SSL via stunnel.
Added the client rsync-ssl script and various client/daemon support
files needed for talking to an rsync daemon over SSL on port 874 (no
tls support). This uses an elegant stunnel setup that was detailed
by dozzie (see the resources page) now that stunnel4 has improved
command-spawning support. Also incorporates some tweaks by devzero
(e.g. the nice no-tmpfile-config client-side code) and a few by me
(including logging of the actual remote IP that came in to the
stunnel process). This probably still needs a little work.
Wayne Davison [Sun, 26 May 2013 21:52:50 +0000 (14:52 -0700)]
Avoid I/O via signal-handler thread.
The cleanup code will try to flush the output buffer in some
circumstances, which is not valid if we're handling an async signal
(since it might have interrupted some partial I/O in the main thread).
These signals now set a flag and try to let the main I/O handler take
care of the exit strategy. Fixes a protocol error that could happen
when trying to exit after a kill signal.
Wayne Davison [Sun, 19 May 2013 23:56:34 +0000 (23:56 +0000)]
Improve iconvbufs() to do more buffer size checks.
- If iconv() returns EINVAL or EILSEQ and the error is being ignored, make
sure that there is room in the output buffer to store the erroneous char.
- When accepting an erroneous char, be sure to break if there are no more
input characters (without calling iconv() with a zero input length).
Wayne Davison [Sat, 19 Jan 2013 17:52:56 +0000 (09:52 -0800)]
Further improve non-empty-destination --link-dest behavior:
- Avoid relinking a file that is already linked correctly.
- Avoid trashing the stat buffer of an existing file in try_dests_reg().
Wayne Davison [Sat, 8 Sep 2012 23:29:45 +0000 (16:29 -0700)]
Make read_args() return the full request.
When a daemon is sent multiple request args, they are now joined into a
single return value (separated by spaces) so that the RSYNC_REQUEST
environment variable is accurate for any "pre-xfer exec". The values
in RSYNC_ARG# vars are no longer truncated at the "." arg, so that all
the request values are also listed (separately) in RSYNC_ARG#.
Wayne Davison [Wed, 21 Dec 2011 16:30:07 +0000 (08:30 -0800)]
Improve the handling of verbose/debug messages
The sender no longer allows a filelist to be sent in the middle of
parsing an incoming message, so that the directory sending doesn't block
all further input reading. The generator no longer allows recursive
reading of info/error messages when it is waiting for the message buffer
to flush. This avoids a stack overflow when lots of messages are coming
from the receiver and the sender is not reading things quickly enough.
The I/O code now avoids sending debug messages that could mess up the
I/O buffer it was in the middle of tweaking. This fixes an infinite
loop in reduce_iobuf_size() with high levels of debug enabled. Several
I/O-related messages were changed to output only when --msgs2stderr is
enabled.
Ben Walton [Mon, 12 Sep 2011 00:57:05 +0000 (02:57 +0200)]
Better configure support for Solaris xattrs
If we have the attropen() function, allow OS conditional enabling of
extended attribute support. This removes the need to pass
--enable-extended-attributes to force the feature activation on Solaris.