Based on patch submited by David R. Staples. Todd Vander Does contributed
the following test which showed the problem:
> mkdir /tmp/nowrite
> chmod -w /tmp/nowrite
> rsync /etc/group /tmp/nowrite || echo $status
mkstemp .group.cUaaeY failed
rsync error: partial transfer (code 23) at main.c(518)
23
> rsync -e ssh loki:/etc/group /tmp/nowrite || echo $status
mkstemp .group.1rayeY failed
> rsync -e ssh loki:/etc/group /tmp/nowrite && echo $status
mkstemp .group.fbaGiY failed
0
The remote copy should have returned non-zero exit code like the local copy.
canonical form ``$RSYNC'' (set in testsuite/rsync.fns). This prevents any
stray rsync binaries in the user's PATH from being picked up by the test
scripts and ensures that the newly built rsync binary is used always.
to see if it excluded before reporting an error. Previously it was only
checking for the exclusion if copy_links was enabled, but the error can
also occur if a file disappears during an rsync run. Suggested by Eugene
V. Chupriyanov and Bo Kersey.
new rsync being in $PATH; it may pick up an old version, invalidating the
result of the tests. This is what the other tests do already.
Submitted by: Joel Shprentz <ShprentzJ@nima.mil>
default the config file to just "rsyncd.conf" in the current directory
instead of /etc/rsyncd.conf. Also, fix problems with logging messages when
running daemon mode over a remote shell program: it was pretty much doing
the opposite of what it should have, sending early error messages to the
log and later messages to the client. Switched it around so the very early
error messages go to the client and the later ones go to the log.
* Moved some structures in client_name() so that they remain in-scope for
the entire function (since we set pointers to their storage location).
* Allow the dot-counting loop to increment to 4 instead of stopping at 3.
in place: simply check the "am_server" global variable, which is not set
true when the daemon is listening for connections (daemon_main is not
called in main.c if am_server is set).
-e ssh and :: together. Uses $SSH_CLIENT to locate the IP address
(was attempting to before but it didn't always work) and then uses
inet_pton() on that and getnameinfo() to find the name.
start_inband_exchange() and made several functions take two fds
(for the daemon via remote-shell support). The start_daemon()
function is no longer static and now works on non-socket fds.
Every other failure condition in that function was alreadying doing this,
and I saw a case with a lot of "mkstemp...No space left on device" messages
started becoming "mkstemp...Too many open files" messages because of this
bug. Not that it makes a whole lot of difference, since nothing gets copied
because the disk was out of space.