Wayne Davison [Fri, 10 Jan 2003 08:32:09 +0000 (08:32 +0000)]
Reset the io_error_fd right before the generator kills off the receiver
(because the death of the receiver will close the fd and cause the
generator to fail in any subsequent IO).
David Dykstra [Thu, 9 Jan 2003 19:04:06 +0000 (19:04 +0000)]
Fixed bug that caused rsync to lose exit status of its child processes.
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.
Jos Backus [Tue, 24 Dec 2002 07:42:04 +0000 (07:42 +0000)]
Add "void" to some function definitions so that all declarations in proto.h
have full parameter lists. This helps unbreaking compilation on SCO UNIXWare.
Jos Backus [Tue, 24 Dec 2002 07:25:25 +0000 (07:25 +0000)]
Change all relevant occurrences of ``rsync'' and ``$rsync_bin'' to the
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.
David Dykstra [Wed, 11 Dec 2002 18:48:27 +0000 (18:48 +0000)]
When a file shows up as not existent during an rsync run, always check
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.
Jos Backus [Tue, 5 Nov 2002 18:35:59 +0000 (18:35 +0000)]
Fix the chgrp and hardlinks tests by running $RSYNC instead of relying on the
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.
David Dykstra [Fri, 30 Aug 2002 23:27:26 +0000 (23:27 +0000)]
When using daemon mode over a remote shell program and not running as root,
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.
Wayne Davison [Fri, 2 Aug 2002 17:11:39 +0000 (17:11 +0000)]
* Don't call getnameinfo() if we've already populated the addr_buf.
* 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.
David Dykstra [Fri, 2 Aug 2002 15:39:43 +0000 (15:39 +0000)]
Put in better method of checking whether or not daemon over --rsh mode is
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).
David Dykstra [Fri, 2 Aug 2002 15:05:03 +0000 (15:05 +0000)]
Fix client_name to work on when INET6 is enabled but using a 4-part IPv4
IP address. Tested on Linux, but only with an IPv4 ssh. Somebody who has
IPv6 enabled on ssh needs to test it yet.
David Dykstra [Thu, 1 Aug 2002 21:57:23 +0000 (21:57 +0000)]
Fix last change to use correct IPv6 structure names when using INET6.
Doesn't yet look up names correctly on Linux with INET6 enabled, however;
needs further work but I don't have time right now.
David Dykstra [Thu, 1 Aug 2002 19:17:00 +0000 (19:17 +0000)]
Fix to correctly identify remote IP address and host name when using
-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.
Wayne Davison [Thu, 1 Aug 2002 00:36:56 +0000 (00:36 +0000)]
Moved the end of start_socket_client() into a new function called
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.
Wayne Davison [Sat, 27 Jul 2002 18:01:21 +0000 (18:01 +0000)]
- Fixed a crash in flist_find() when the last item in the flist has
been removed as a duplicate.
- Got rid of a compiler warning about mixed signed/unsigned types in a
conditional expression.
David Dykstra [Tue, 28 May 2002 15:42:51 +0000 (15:42 +0000)]
Close previously opened file descriptor when mkstemp fails in recv_files().
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.
Wayne Davison [Mon, 6 May 2002 19:02:44 +0000 (19:02 +0000)]
- Improved the references to rsh to better indicate that rsync may be
configured to use some other remote shell by default.
- Fixed the mention of ssh's preferred IO-blocking mode.
Martin Pool [Thu, 11 Apr 2002 02:16:34 +0000 (02:16 +0000)]
Receiving an @ERROR line from the server is (I think) always fatal, so
the client should exit upon receiving one and not be surprised that
the socket closes.
Martin Pool [Thu, 11 Apr 2002 01:56:35 +0000 (01:56 +0000)]
Receiving an @ERROR line from the server is (I think) always fatal, so
the client should exit upon receiving one and not be surprised that
the socket closes.