David Dykstra [Fri, 25 Feb 2000 17:02:45 +0000 (17:02 +0000)]
Describe symbolic link handling when writing to a "use chroot = no" module.
David Dykstra [Tue, 22 Feb 2000 19:47:44 +0000 (19:47 +0000)]
Somebody was confused into thinking that "Here are some examples" in the
section on exclude/include was supposed to be about "+/-" so I changed
the statement to "Here are some exclude/include examples".
David Dykstra [Tue, 22 Feb 2000 15:55:40 +0000 (15:55 +0000)]
Change socketpair test to verify that it works rather than just exists,
because I have an obscure system (Amdahl's UTS 2.1.2) in which socketpair()
exists but is broken.
David Dykstra [Tue, 15 Feb 2000 22:44:18 +0000 (22:44 +0000)]
Move the checking for -lsocket -lnsl ahead of the checking for most of
the functions, especially "socketpair" so that socket-related functions will
be properly discovered on SVR4-based systems such as Solaris. Problem
discovered by Kenji Miyake <kenji@miyake.org>
rsync-bugs [Sun, 30 Jan 2000 01:02:59 +0000 (01:02 +0000)]
preparing for release of 2.4.1
Andrew Tridgell [Sun, 30 Jan 2000 00:56:43 +0000 (00:56 +0000)]
patch from Jim Delahanty <mail_us@swbell.net> to ensure files are
deleted after being backed up in a rename operation
Andrew Tridgell [Sun, 30 Jan 2000 00:50:19 +0000 (00:50 +0000)]
another hang-at-end fix. It looks like we are more sensiitive to
these with socketpairs. The receiver now sleeps until it gets a signal
to tell it to exit
also fixed test.sh to use the current version remotely
Andrew Tridgell [Sat, 29 Jan 2000 23:49:36 +0000 (23:49 +0000)]
damn.
with the new error handling code it is possible for rsync to get stuck
on the final transaction, leaving it hung.
looks like 2.4.1 will be pretty soon
rsync-bugs [Sat, 29 Jan 2000 11:35:39 +0000 (11:35 +0000)]
preparing for release of 2.4.0
Andrew Tridgell [Sat, 29 Jan 2000 05:25:53 +0000 (05:25 +0000)]
change version to 2.4.0pre2
Andrew Tridgell [Sat, 29 Jan 2000 05:16:13 +0000 (05:16 +0000)]
use full buffer length, not strlen
Andrew Tridgell [Sat, 29 Jan 2000 05:02:23 +0000 (05:02 +0000)]
move the read only daemon test to after the protocol setup
Andrew Tridgell [Sat, 29 Jan 2000 04:50:01 +0000 (04:50 +0000)]
damn!
the last pre-release had a bug that didn't setup the multiplexing
correctly. This means that pre-release will get "unexpected tag -7"
whenm talking to the fixed code.
Andrew Tridgell [Sat, 29 Jan 2000 03:11:07 +0000 (03:11 +0000)]
I've decided that this release will be 2.4.0, updated version to 2.4.0pre1
Andrew Tridgell [Sat, 29 Jan 2000 02:56:36 +0000 (02:56 +0000)]
don't need PIPE_BUF any more
Andrew Tridgell [Sat, 29 Jan 2000 02:49:03 +0000 (02:49 +0000)]
fixed some logcode warnings
Andrew Tridgell [Sat, 29 Jan 2000 02:39:52 +0000 (02:39 +0000)]
fixed a bug in test suite that I introduced yesterday
Andrew Tridgell [Sat, 29 Jan 2000 02:35:01 +0000 (02:35 +0000)]
runtime detect fnmatch() bug if ** is used.
its all too common to compile with a working libc and run on a broken
one.
Andrew Tridgell [Fri, 28 Jan 2000 15:35:08 +0000 (15:35 +0000)]
changed version to 2.3.3pre2
Andrew Tridgell [Fri, 28 Jan 2000 15:29:59 +0000 (15:29 +0000)]
- switched on multiplexing for all connections, not just daemon
connections (this fixes the stderr/stdout problem). Upped
protocol version for backward compat
- use multiplexing on error fd
- upped minimal protocol version
- got rid of some ugly code in the write buffering
Andrew Tridgell [Fri, 28 Jan 2000 12:37:58 +0000 (12:37 +0000)]
switch to using socketpair instead of pipe if possible. This fixes the
ssh clag problems as long as you also fix the same problem in sshd
removed all the old read buffering code from io.c as this was only
there to try to reduce the chance of clagging up sshd.
Andrew Tridgell [Thu, 27 Jan 2000 04:54:02 +0000 (04:54 +0000)]
report exit code when failing a test
Andrew Tridgell [Thu, 27 Jan 2000 04:53:39 +0000 (04:53 +0000)]
fixed the error code problem with test.sh
(was a minor bug in send_file_list)
Andrew Tridgell [Thu, 27 Jan 2000 02:45:56 +0000 (02:45 +0000)]
patch from James Delahanty <jimd@gie.com> to make --backup-dir work
cross-filesystem
Andrew Tridgell [Tue, 25 Jan 2000 14:17:21 +0000 (14:17 +0000)]
the convoluted nest of #ifdefs that is fnmatch.c caught us again. On
my system the LIBC tests meant it never compiled and we used the
broken system one.
hacked it so it does compile
Andrew Tridgell [Tue, 25 Jan 2000 13:16:42 +0000 (13:16 +0000)]
fix segv bug in --progress handling
Andrew Tridgell [Tue, 25 Jan 2000 06:39:33 +0000 (06:39 +0000)]
patch from David Murn to make sure the final 100% is always printed
when using --progress
Andrew Tridgell [Tue, 25 Jan 2000 01:33:05 +0000 (01:33 +0000)]
updated version.h
Andrew Tridgell [Mon, 24 Jan 2000 13:12:20 +0000 (13:12 +0000)]
updated config.guess from latest autoconf CVS tree
Andrew Tridgell [Mon, 24 Jan 2000 12:28:45 +0000 (12:28 +0000)]
updated --password-file docs
Andrew Tridgell [Mon, 24 Jan 2000 12:23:39 +0000 (12:23 +0000)]
reinstated the MAX_READ_BUFFER code. Its a nasty tradeoff - using lots
of memory vs. ssh bugs. uggh.
Andrew Tridgell [Mon, 24 Jan 2000 12:22:58 +0000 (12:22 +0000)]
updated a debug message
Andrew Tridgell [Mon, 24 Jan 2000 12:02:44 +0000 (12:02 +0000)]
make the replacement inet_aton() function independent of
inet_addr(). Some systems were detecting a missing inet_aton(), but
actually had it and inet_addr() called it, causing infinite recursion
Andrew Tridgell [Mon, 24 Jan 2000 11:41:08 +0000 (11:41 +0000)]
fixed a rare SEGV that can happen when a file disappears (due to
another program) during an update
Andrew Tridgell [Mon, 24 Jan 2000 11:20:25 +0000 (11:20 +0000)]
moved file deletion to before the fork() to prevent a race condition
pointed out by byrnes@curl.com
Andrew Tridgell [Mon, 24 Jan 2000 09:19:44 +0000 (09:19 +0000)]
don't use stderr after we become a daemon
Andrew Tridgell [Mon, 24 Jan 2000 09:13:39 +0000 (09:13 +0000)]
I can't believe it - solaris allows unlink of a non-empty directory as
root, leaving a corrupt filesystem. Are those guys on drugs?
try to avoid the problem as best we can.
Andrew Tridgell [Mon, 24 Jan 2000 08:16:57 +0000 (08:16 +0000)]
added some more debug info to the "buffer overflow in
receive_file_entry" message
Andrew Tridgell [Mon, 24 Jan 2000 05:52:44 +0000 (05:52 +0000)]
-a now implies -o and -D whether you are root or not
Andrew Tridgell [Mon, 24 Jan 2000 04:58:53 +0000 (04:58 +0000)]
added --backup-dir option from Bob Edwards
this is very useful for incremental backups
Andrew Tridgell [Sun, 23 Jan 2000 13:16:30 +0000 (13:16 +0000)]
removed Daves include-only optimisation. One of the bug reports turned
out to be caused by it and it seems rather a lot of extra effort for
what must really be a minor optimisation in most cases
Andrew Tridgell [Sun, 23 Jan 2000 12:30:34 +0000 (12:30 +0000)]
fix a problem with files > 2GB
(thanks to T.J.Adye@rl.ac.uk)
Andrew Tridgell [Sun, 23 Jan 2000 11:43:04 +0000 (11:43 +0000)]
added --max-delete option
Andrew Tridgell [Sun, 23 Jan 2000 11:26:10 +0000 (11:26 +0000)]
fixed mdfour code on Cray (64 bit problems)
Thanks to roebel@kgw.tu-berlin.de
Andrew Tridgell [Sun, 23 Jan 2000 07:38:20 +0000 (07:38 +0000)]
removed u_sleep() as it is no longer used anywhere
Andrew Tridgell [Sun, 23 Jan 2000 07:36:56 +0000 (07:36 +0000)]
added some really ugly code to allow errors to propogate to
clients when writing to a rsync server
it works like this:
- we have an extra pipe from the receiver to the generator
- the server always runs with multiplexing on
- errors from the generator go down the multiplexed connection
- errors from the receiver go over the pipe, and from there to
the multiplexed conn
it required some incredibly ugly code. damn.
Andrew Tridgell [Sun, 23 Jan 2000 03:00:27 +0000 (03:00 +0000)]
open on paths starting with // fails on win32
Andrew Tridgell [Sun, 23 Jan 2000 02:16:51 +0000 (02:16 +0000)]
handle systems that don't take a 2nd argument to gettimeofday()
Andrew Tridgell [Sun, 23 Jan 2000 01:53:18 +0000 (01:53 +0000)]
added --existing option, similar to one suggested by Gildas Quiniou <gildas@stip.fr>
Andrew Tridgell [Sun, 23 Jan 2000 01:11:43 +0000 (01:11 +0000)]
don't try to write errors to a dead socket
David Dykstra [Mon, 10 Jan 2000 22:39:45 +0000 (22:39 +0000)]
Make all the rsync objects dependent on all the header files except the
zlib header fiels in Makefile.in. I've been burned several times because
objects did not get rebuilt when header files changed.
David Dykstra [Mon, 10 Jan 2000 20:36:20 +0000 (20:36 +0000)]
Needed to comment out the inclusion of headers in fnmatch.c because it
couldn't find some of them (especially <fnmatch.h>, because it wasn't
looking in the current directory). The header files are included better
from ../rsync.h.
Andrew Tridgell [Mon, 10 Jan 2000 04:49:51 +0000 (04:49 +0000)]
make --address work for a client connecting to a server
David Dykstra [Fri, 7 Jan 2000 17:58:44 +0000 (17:58 +0000)]
Upgrade lib/fnmatch.[ch] to the latest from glibc-2.1.2 because the
FNM_PATHNAME flag (to stop at slashes in path names) was not working.
Ironically, the bug in glibc's fnmatch was reported on the rsync mailing
list in late October, and rsync's configure.in was changed to detect the
bad glibc and use the internal fnmatch, but the internal fnmatch was based
on the same buggy glibc!
David Dykstra [Thu, 6 Jan 2000 16:15:36 +0000 (16:15 +0000)]
If a destination file cannot be opened, pretend it doesn't exist rather
than skipping it and thus not updating it. For example, the ownership or
mode on a file may prevent opening it, but the directory may still be
writable so the file could be completely replaced.
Andrew Tridgell [Thu, 6 Jan 2000 00:26:00 +0000 (00:26 +0000)]
when we do a lchown() on a file we have to flush the cached perms on
the file if the file has the setuid or setgid bits set as the chown
has a side effect of removing the setuid and setgid bits.
we re-do the stat in this case
David Dykstra [Wed, 29 Dec 1999 21:11:57 +0000 (21:11 +0000)]
Define the WEXITSTATUS macro for systems that don't have it.
David Dykstra [Wed, 29 Dec 1999 20:50:48 +0000 (20:50 +0000)]
When writing to a daemon with read only = false and uid = root and -g,
was not preserving group permisions. Bug was introduced March 1 in
version 1.100 of rsync.c with an error in re-ordering of the boolean
expressions. In order to completely preserve the earlier semantics,
change_gid should depend on "(am_root || !am_daemon)", but I don't see why
group ownership should behave differently in a non-root daemon.
David Dykstra [Wed, 29 Dec 1999 20:45:23 +0000 (20:45 +0000)]
When not using -p and file being copied to already existed, was mistakenly
using all the mode bits of the existing file rather than just the permissions,
including the file type.
Andrew Tridgell [Thu, 9 Dec 1999 06:46:11 +0000 (06:46 +0000)]
fixed a bug with waitpid() - I'd forgotten about WEXITSTATUS !
Andrew Tridgell [Fri, 3 Dec 1999 04:24:25 +0000 (04:24 +0000)]
fixed man page typo
Andrew Tridgell [Thu, 2 Dec 1999 05:50:09 +0000 (05:50 +0000)]
fixed a segv bug when handling symlinks.
thanks to taver@otenet.gr
Andrew Tridgell [Tue, 23 Nov 1999 08:43:16 +0000 (08:43 +0000)]
don't write more than PIPE_BUF bytes in any one write() in io.c
this makes sure that the write never blocks.
Andrew Tridgell [Mon, 15 Nov 1999 01:32:20 +0000 (01:32 +0000)]
removed old non-blocking fd code (a hangover from a earlier version of
io.c). Thanks to Theo for pointing out this brokenness.
rsync-bugs [Mon, 8 Nov 1999 13:15:48 +0000 (13:15 +0000)]
preparing for release of 2.3.2
Andrew Tridgell [Mon, 8 Nov 1999 13:03:05 +0000 (13:03 +0000)]
added --delete-after option (suggested by Jason)
Andrew Tridgell [Mon, 8 Nov 1999 10:47:14 +0000 (10:47 +0000)]
removed ACCESSPERMS mask when transferring a file without perms
copy. This makes us match GNU cp more closely.
Andrew Tridgell [Mon, 8 Nov 1999 09:12:42 +0000 (09:12 +0000)]
fixed passing of directory exclude options to remote side (thanks to
andrewdagger@xerox.gbr.com)
added note about multiple excludes per exclude option
David Dykstra [Thu, 4 Nov 1999 15:43:38 +0000 (15:43 +0000)]
Fixed bug introduced by calling do_open() for O_RDONLY files. Changed it
so the check for dry_run and CHECK_RO are not done when flags is O_RDONLY.
Only do the adding of O_BINARY, which was the intention.
Andrew Tridgell [Mon, 1 Nov 1999 21:35:15 +0000 (21:35 +0000)]
added a replacement inet_aton() for systems that don't have it.
thanks to Dave for pointing this out.
Andrew Tridgell [Mon, 1 Nov 1999 21:25:39 +0000 (21:25 +0000)]
forgot to commit the fnmatch.h changes
Andrew Tridgell [Sun, 31 Oct 1999 04:28:03 +0000 (04:28 +0000)]
solved the problem of not using the right permissions when
preserve_perms is off.
Andrew Tridgell [Sun, 31 Oct 1999 03:21:02 +0000 (03:21 +0000)]
added --address option for virtual hosting
Andrew Tridgell [Sun, 31 Oct 1999 02:47:30 +0000 (02:47 +0000)]
added -P option
it is equivalent to --partial --progress
Andrew Tridgell [Sun, 31 Oct 1999 02:39:34 +0000 (02:39 +0000)]
updated test suite from Phil.
Andrew Tridgell [Sun, 31 Oct 1999 02:37:21 +0000 (02:37 +0000)]
updated rsync-path man page entry
Andrew Tridgell [Sun, 31 Oct 1999 02:19:24 +0000 (02:19 +0000)]
added "ignore errors" option in rsyncd.conf
Andrew Tridgell [Wed, 27 Oct 1999 13:17:16 +0000 (13:17 +0000)]
updated the configure test for fnmatch() to see if FNM_PATHNAME is
working correctly.
Andrew Tridgell [Mon, 25 Oct 1999 22:04:09 +0000 (22:04 +0000)]
use do_open() instead of open() in several places to help the WinXX port
and O_BINARY
David Dykstra [Tue, 19 Oct 1999 17:50:39 +0000 (17:50 +0000)]
Minor change suggesting people put in the right path in inetd.conf.
Suggested by Roger Price <rprice@cs.uml.edu>
Andrew Tridgell [Mon, 6 Sep 1999 02:04:20 +0000 (02:04 +0000)]
added a note about using -v with --progress
Andrew Tridgell [Mon, 30 Aug 1999 08:19:47 +0000 (08:19 +0000)]
separated out the make_backup code in preparation for some patches
from Bob Edwards
David Dykstra [Fri, 9 Jul 1999 17:07:59 +0000 (17:07 +0000)]
Add a couple clarifying points to the sanitize_path() comments.
One is a note that a leading "/" in a symlink target will not behave
exactly as if a chroot had occurred, but I decided it wasn't worth the
making it the same.
The other is note about an extra harmless trailing "." that is added under
some rare circumstances.
David Dykstra [Fri, 9 Jul 1999 15:49:46 +0000 (15:49 +0000)]
Fix significant security holes with "use chroot = no" in an rsync daemon:
1. The file paths being sent and received were not "sanitized" to
ensure that there weren't any ".." components that would escape the
top level directory. This can't happen with the standard rsync
client, but it could be exploited on both read and write if someone
modified an rsync client. This fix sanitizes all incoming and
outgoing paths when "use chroot = no".
2. If a module is also "read only = no", clients could have created
symbolic links with ".." components that would allow writing
outside of the module. This could happen with the standard rsync
client. This fix sanitizes all incoming symbolic link targets
when "use chroot = no".
Previously, only top-level paths (anything passed in command line arguments)
were sanitized. Sorry, I didn't think about the individual file paths
before now.
Andrew Tridgell [Sun, 27 Jun 1999 04:12:12 +0000 (04:12 +0000)]
continue calling waitpid() while still reapingchildren (patch from
Matti Aarnio)
Andrew Tridgell [Sat, 26 Jun 1999 01:06:38 +0000 (01:06 +0000)]
fixed a bug that made us use only 16 bits of the file checksum when
comparing checksums for the --checksum (-c) option.
Andrew Tridgell [Tue, 13 Apr 1999 03:53:30 +0000 (03:53 +0000)]
added RSYNC_PROXY support from Stephen Rothwell. This allows access to
rsync servers via a web proxy (useful for getting through firewalls)
rsync-bugs [Tue, 6 Apr 1999 15:09:28 +0000 (15:09 +0000)]
preparing for release of 2.3.1
Andrew Tridgell [Tue, 6 Apr 1999 14:52:32 +0000 (14:52 +0000)]
set the exit code to RERR_FILEIO is io_error is set when we exit. This
catches most sorts of io errors and ensures we report a error in our
exit status.
Andrew Tridgell [Tue, 6 Apr 1999 14:17:44 +0000 (14:17 +0000)]
these aren't used any more
Andrew Tridgell [Tue, 6 Apr 1999 12:30:36 +0000 (12:30 +0000)]
handle the case of an empty file list in get_local_name
Andrew Tridgell [Tue, 6 Apr 1999 12:28:54 +0000 (12:28 +0000)]
don't abort the server side if the file list is empty (perhaps because
all files have been excluded).
Andrew Tridgell [Tue, 6 Apr 1999 11:52:45 +0000 (11:52 +0000)]
note in the man page that:
1) rsync won't copy directories at all if recursion isn't selected
2) --delete won't do anything if recursion isn't selected
Andrew Tridgell [Tue, 6 Apr 1999 11:34:06 +0000 (11:34 +0000)]
fix the man page to reflect the fact that exclude options in
rsyncd.conf are not passed to the client and thus only affect the file
lists on the server.
Andrew Tridgell [Tue, 6 Apr 1999 10:56:18 +0000 (10:56 +0000)]
fixed a nasty bug in the handling of "local_name" when setting the
permissions on directories after a transfer.
Andrew Tridgell [Tue, 6 Apr 1999 10:27:34 +0000 (10:27 +0000)]
quote RPM_OPT_FLAGS
patch from racke@linuxia.de
David Dykstra [Fri, 2 Apr 1999 18:24:27 +0000 (18:24 +0000)]
Small bug fix for the --compare-dest option: when a file's contents
hadn't changed but its permissions had, the file wasn't copied but
its permissions were attempted to be set anyway. Made a change to
skip setting the permissions in that case.
David Dykstra [Wed, 24 Mar 1999 19:28:03 +0000 (19:28 +0000)]
Backed out the change to create missing parent directories when using
--compare-dest. It was due to an incomplete analysis of the problem,
sorry. I left a comment in its place indicating that normally the
parent directories should already have been created.
It turned out to actually be a bug in nsbd in which it was not always
including all the parent directories in the include list like it was
supposed to. The files themselves were still being sent but that was only
because my exclude_the_rest optimization was kicking in; if it weren't,
excluding the parent directories would have had the side effect of
excluding the files too. So it really had nothing to do with the
--compare-dest option after all, just with the requirement that if you use
--exclude '*' you need to explicitly include all parent directories of
files you include.
David Dykstra [Wed, 24 Mar 1999 16:39:07 +0000 (16:39 +0000)]
The "pid file" was getting created mode 666, not applying the umask
because at that point in the program the umask is set to 0. Now creating
the file with mode (666 & ~orig_umask).
David Dykstra [Tue, 23 Mar 1999 22:20:10 +0000 (22:20 +0000)]
Fix bug with --compare-dest option where missing parent directories in the
target destination were not getting created. There was a case in
receiver.c to do that but it was only getting invoked when the -R option is
specified, although I don't know why it was limited to that.
It's too bad I didn't get a chance to more fully test the use of
--compare-dest by my nsbd program before releasing rsync 2.3.0. I'll
probably need to put a workaround in nsbd too until the next release
of rsync.