rsync.git
19 years ago- switched on multiplexing for all connections, not just daemon
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

19 years agoswitch to using socketpair instead of pipe if possible. This fixes the
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.

19 years agoreport exit code when failing a test
Andrew Tridgell [Thu, 27 Jan 2000 04:54:02 +0000 (04:54 +0000)]
report exit code when failing a test

19 years agofixed the error code problem with test.sh
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)

19 years agopatch from James Delahanty <jimd@gie.com> to make --backup-dir work
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

19 years agothe convoluted nest of #ifdefs that is fnmatch.c caught us again. On
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

19 years agofix segv bug in --progress handling
Andrew Tridgell [Tue, 25 Jan 2000 13:16:42 +0000 (13:16 +0000)]
fix segv bug in --progress handling

19 years agopatch from David Murn to make sure the final 100% is always printed
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

19 years agoupdated version.h
Andrew Tridgell [Tue, 25 Jan 2000 01:33:05 +0000 (01:33 +0000)]
updated version.h

19 years agoupdated config.guess from latest autoconf CVS tree
Andrew Tridgell [Mon, 24 Jan 2000 13:12:20 +0000 (13:12 +0000)]
updated config.guess from latest autoconf CVS tree

19 years agoupdated --password-file docs
Andrew Tridgell [Mon, 24 Jan 2000 12:28:45 +0000 (12:28 +0000)]
updated --password-file docs

19 years agoreinstated the MAX_READ_BUFFER code. Its a nasty tradeoff - using lots
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.

19 years agoupdated a debug message
Andrew Tridgell [Mon, 24 Jan 2000 12:22:58 +0000 (12:22 +0000)]
updated a debug message

19 years agomake the replacement inet_aton() function independent of
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

19 years agofixed a rare SEGV that can happen when a file disappears (due to
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

19 years agomoved file deletion to before the fork() to prevent a race condition
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

19 years agodon't use stderr after we become a daemon
Andrew Tridgell [Mon, 24 Jan 2000 09:19:44 +0000 (09:19 +0000)]
don't use stderr after we become a daemon

19 years agoI can't believe it - solaris allows unlink of a non-empty directory as
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.

19 years agoadded some more debug info to the "buffer overflow in
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

19 years ago-a now implies -o and -D whether you are root or not
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

19 years agoadded --backup-dir option from Bob Edwards
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

19 years agoremoved Daves include-only optimisation. One of the bug reports turned
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

19 years agofix a problem with files > 2GB
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)

19 years agoadded --max-delete option
Andrew Tridgell [Sun, 23 Jan 2000 11:43:04 +0000 (11:43 +0000)]
added --max-delete option

19 years agofixed mdfour code on Cray (64 bit problems)
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

19 years agoremoved u_sleep() as it is no longer used anywhere
Andrew Tridgell [Sun, 23 Jan 2000 07:38:20 +0000 (07:38 +0000)]
removed u_sleep() as it is no longer used anywhere

19 years agoadded some really ugly code to allow errors to propogate to
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.

19 years agoopen on paths starting with // fails on win32
Andrew Tridgell [Sun, 23 Jan 2000 03:00:27 +0000 (03:00 +0000)]
open on paths starting with // fails on win32

19 years agohandle systems that don't take a 2nd argument to gettimeofday()
Andrew Tridgell [Sun, 23 Jan 2000 02:16:51 +0000 (02:16 +0000)]
handle systems that don't take a 2nd argument to gettimeofday()

19 years agoadded --existing option, similar to one suggested by Gildas Quiniou <gildas@stip.fr>
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>

19 years agodon't try to write errors to a dead socket
Andrew Tridgell [Sun, 23 Jan 2000 01:11:43 +0000 (01:11 +0000)]
don't try to write errors to a dead socket

19 years agoMake all the rsync objects dependent on all the header files except the
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.

19 years agoNeeded to comment out the inclusion of headers in fnmatch.c because it
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.

19 years agomake --address work for a client connecting to a server
Andrew Tridgell [Mon, 10 Jan 2000 04:49:51 +0000 (04:49 +0000)]
make --address work for a client connecting to a server

19 years agoUpgrade lib/fnmatch.[ch] to the latest from glibc-2.1.2 because the
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!

19 years agoIf a destination file cannot be opened, pretend it doesn't exist rather
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.

19 years agowhen we do a lchown() on a file we have to flush the cached perms on
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

19 years agoDefine the WEXITSTATUS macro for systems that don't have it.
David Dykstra [Wed, 29 Dec 1999 21:11:57 +0000 (21:11 +0000)]
Define the WEXITSTATUS macro for systems that don't have it.

19 years agoWhen writing to a daemon with read only = false and uid = root and -g,
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.

19 years agoWhen not using -p and file being copied to already existed, was mistakenly
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.

19 years agofixed a bug with waitpid() - I'd forgotten about WEXITSTATUS !
Andrew Tridgell [Thu, 9 Dec 1999 06:46:11 +0000 (06:46 +0000)]
fixed a bug with waitpid() - I'd forgotten about WEXITSTATUS !

19 years agofixed man page typo
Andrew Tridgell [Fri, 3 Dec 1999 04:24:25 +0000 (04:24 +0000)]
fixed man page typo

19 years agofixed a segv bug when handling symlinks.
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

19 years agodon't write more than PIPE_BUF bytes in any one write() in io.c
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.

19 years agoremoved old non-blocking fd code (a hangover from a earlier version of
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.

19 years agopreparing for release of 2.3.2 v2.3.2
rsync-bugs [Mon, 8 Nov 1999 13:15:48 +0000 (13:15 +0000)]
preparing for release of 2.3.2

19 years agoadded --delete-after option (suggested by Jason)
Andrew Tridgell [Mon, 8 Nov 1999 13:03:05 +0000 (13:03 +0000)]
added --delete-after option (suggested by Jason)

19 years agoremoved ACCESSPERMS mask when transferring a file without perms
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.

19 years agofixed passing of directory exclude options to remote side (thanks to
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

19 years agoFixed bug introduced by calling do_open() for O_RDONLY files. Changed it
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.

19 years agoadded a replacement inet_aton() for systems that don't have it.
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.

19 years agoforgot to commit the fnmatch.h changes
Andrew Tridgell [Mon, 1 Nov 1999 21:25:39 +0000 (21:25 +0000)]
forgot to commit the fnmatch.h changes

19 years agosolved the problem of not using the right permissions when
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.

19 years agoadded --address option for virtual hosting
Andrew Tridgell [Sun, 31 Oct 1999 03:21:02 +0000 (03:21 +0000)]
added --address option for virtual hosting

19 years agoadded -P option
Andrew Tridgell [Sun, 31 Oct 1999 02:47:30 +0000 (02:47 +0000)]
added -P option

it is equivalent to --partial --progress

19 years agoupdated test suite from Phil.
Andrew Tridgell [Sun, 31 Oct 1999 02:39:34 +0000 (02:39 +0000)]
updated test suite from Phil.

19 years agoupdated rsync-path man page entry
Andrew Tridgell [Sun, 31 Oct 1999 02:37:21 +0000 (02:37 +0000)]
updated rsync-path man page entry

19 years agoadded "ignore errors" option in rsyncd.conf
Andrew Tridgell [Sun, 31 Oct 1999 02:19:24 +0000 (02:19 +0000)]
added "ignore errors" option in rsyncd.conf

19 years agoupdated the configure test for fnmatch() to see if FNM_PATHNAME is
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.

19 years agouse do_open() instead of open() in several places to help the WinXX port
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

19 years agoMinor change suggesting people put in the right path in inetd.conf.
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>

19 years agoadded a note about using -v with --progress
Andrew Tridgell [Mon, 6 Sep 1999 02:04:20 +0000 (02:04 +0000)]
added a note about using -v with --progress

19 years agoseparated out the make_backup code in preparation for some patches
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

20 years agoAdd a couple clarifying points to the sanitize_path() comments.
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.

20 years agoFix significant security holes with "use chroot = no" in an rsync daemon:
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.

20 years agocontinue calling waitpid() while still reapingchildren (patch from
Andrew Tridgell [Sun, 27 Jun 1999 04:12:12 +0000 (04:12 +0000)]
continue calling waitpid() while still reapingchildren (patch from
Matti Aarnio)

20 years agofixed a bug that made us use only 16 bits of the file checksum when
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.

20 years agoadded RSYNC_PROXY support from Stephen Rothwell. This allows access to
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)

20 years agopreparing for release of 2.3.1 v2.3.1
rsync-bugs [Tue, 6 Apr 1999 15:09:28 +0000 (15:09 +0000)]
preparing for release of 2.3.1

20 years agoset the exit code to RERR_FILEIO is io_error is set when we exit. This
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.

20 years agothese aren't used any more
Andrew Tridgell [Tue, 6 Apr 1999 14:17:44 +0000 (14:17 +0000)]
these aren't used any more

20 years agohandle the case of an empty file list in get_local_name
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

20 years agodon't abort the server side if the file list is empty (perhaps because
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).

20 years agonote in the man page that:
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

20 years agofix the man page to reflect the fact that exclude options in
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.

20 years agofixed a nasty bug in the handling of "local_name" when setting the
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.

20 years agoquote RPM_OPT_FLAGS
Andrew Tridgell [Tue, 6 Apr 1999 10:27:34 +0000 (10:27 +0000)]
quote RPM_OPT_FLAGS
patch from racke@linuxia.de

20 years agoSmall bug fix for the --compare-dest option: when a file's contents
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.

20 years agoBacked out the change to create missing parent directories when using
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.

20 years agoThe "pid file" was getting created mode 666, not applying the umask
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).

20 years agoFix bug with --compare-dest option where missing parent directories in the
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.

20 years agopreparing for release of 2.3.0 v2.3.0
rsync-bugs [Mon, 15 Mar 1999 21:23:26 +0000 (21:23 +0000)]
preparing for release of 2.3.0

20 years agoChanged the protocol version to 20 so that --stats will work without -v in
David Dykstra [Mon, 15 Mar 1999 21:17:58 +0000 (21:17 +0000)]
Changed the protocol version to 20 so that --stats will work without -v in
both directions.

20 years agoFix typo in comment in rsync.h, suggested by bje@cygnus.com
David Dykstra [Mon, 15 Mar 1999 17:04:22 +0000 (17:04 +0000)]
Fix typo in comment in h, suggested by bje@cygnus.com

20 years agoMake a special version number 2.3.0-beta for a short period because
David Dykstra [Fri, 12 Mar 1999 21:45:37 +0000 (21:45 +0000)]
Make a special version number 2.3.0-beta for a short period because
I'll be encouraging extra testing before the release.

20 years agoAllow + and - in the "include" and "exclude" directives in rsyncd.conf.
David Dykstra [Fri, 12 Mar 1999 21:42:51 +0000 (21:42 +0000)]
Allow + and - in the "include" and "exclude" directives in rsyncd.conf.
Patch submitted by Damian A Ivereigh <damian@cisco.com>

20 years agoInclude a test for a working getopt_long because the one on some versions
David Dykstra [Fri, 12 Mar 1999 18:21:53 +0000 (18:21 +0000)]
Include a test for a working getopt_long because the one on some versions
of cygwin doesn't work.  Thanks to Martin Krumpolec <krumpo@pobox.sk> for
the patch.  At the same time, include cache checks in configure.in for a few
items that were missing the checks.

20 years agoWhen -R is used, send the permissions of the original top directories to
David Dykstra [Fri, 12 Mar 1999 17:36:52 +0000 (17:36 +0000)]
When -R is used, send the permissions of the original top directories to
the receiver even when not combined with -r.  Without this, the directories
were getting created mode 777 because the default umask on receivers is
often 00.

20 years agoWhen a file cannot be deleted because of ETXTBSY (in particular, when an
David Dykstra [Thu, 11 Mar 1999 22:17:42 +0000 (22:17 +0000)]
When a file cannot be deleted because of ETXTBSY (in particular, when an
executable is busy on HPUX), rename it instead to .rsyncNNN.  Most of
the code was submitted by Ketil Kristiansen <ketil-k@osc.no>

20 years agoCheck for EINVAL from a rename error call in addition to ENOENT because
David Dykstra [Tue, 9 Mar 1999 21:55:16 +0000 (21:55 +0000)]
Check for EINVAL from a rename error call in addition to ENOENT because
David Campbell <david@pastornet.net.au> reported that that helps data
be received onto a windows box running cygwin b19.

20 years agoAdd distclean target to Makefile.in.
David Dykstra [Tue, 9 Mar 1999 21:47:18 +0000 (21:47 +0000)]
Add distclean target to Makefile.in.

20 years agoUpdate config.sub to the latest from automake in addition to config.guess.
David Dykstra [Tue, 9 Mar 1999 21:46:15 +0000 (21:46 +0000)]
Update config.sub to the latest from automake in addition to config.guess.

20 years agoUpdate config.guess from a new official GNU version.
David Dykstra [Fri, 5 Mar 1999 16:37:44 +0000 (16:37 +0000)]
Update config.guess from a new official GNU version.
I believe this is the latest, which comes with automake 1.4 (somebody
else is in charge of installing the GNU stuff on my system so I'm not
100% sure it's the absolute latest, but it was updated just a couple
weeks ago).

20 years agoThe change a couple days ago to create files initially without group and
David Dykstra [Thu, 4 Mar 1999 21:48:52 +0000 (21:48 +0000)]
The change a couple days ago to create files initially without group and
other access resulted in group and other access being left off when the
'-p' option was not used.  This fixes it by reintroducing the ACCESSPERMS
mask and setting permissions to (file->mode & ACCESSPERMS) if preserve_perms
is off.  I decided to change the mask INITPERMMASK to INITACCESSPERMS at
the same time.  When preserve_perms is off, rsync is restored to the
previous behavior of having the permissions of the original file with the
umask and setuid/setgid bits shut off.

Also, I decided that a check for "(updated && (file->mode & ~ACCESSPERMS))"
is no longer needed since as far as I can tell that would have only affected
permissions when not running as root and when a chgrp was done to a group
the user was not a member of, using system V chgrp semantics.  This is no
longer allowed.

20 years agoDisable the optimization that treats include-only files as a special case
David Dykstra [Tue, 2 Mar 1999 20:56:17 +0000 (20:56 +0000)]
Disable the optimization that treats include-only files as a special case
whenever delete_mode is on.  People reported problems when it kicked in
while using --delete and while using --delete-excluded.

20 years agoChange getgroups to use GETGROUPS_T as the type of the group array returned,
David Dykstra [Tue, 2 Mar 1999 16:42:46 +0000 (16:42 +0000)]
Change getgroups to use GETGROUPS_T as the type of the group array returned,
as calculated by the configure macro AC_TYPE_GETGROUPS.  Without that, it
doesn't work properly on systems like sunos 4 where gid_t is defined to
be an unsigned short but getgroups is defined to return an array of integers.

20 years agoChange the mask used when creating temporary files from 777 to 700, to prevent
David Dykstra [Mon, 1 Mar 1999 21:22:54 +0000 (21:22 +0000)]
Change the mask used when creating temporary files from 777 to 700, to prevent
an obscure race-condition security hole where a file may for a short time
have the wrong group.  Could have used 707 instead but that's just too weird
of a permission.  The define name used to be ACCESSPERMS but that is defined
as 777 on Linux, so changed the name to INITPERMMASK.

20 years agoWhen comparing -1 to a group id, cast -1 with gid_t because on some systems
David Dykstra [Mon, 1 Mar 1999 21:16:49 +0000 (21:16 +0000)]
When comparing -1 to a group id, cast -1 with gid_t because on some systems
such as sunos4 gid_t is an unsigned short.  This prevented the just-added
non-mapped group test from working on sunos4.

20 years agoPrevent the -g option from preserving groups that a non-root receiver
David Dykstra [Mon, 1 Mar 1999 19:24:39 +0000 (19:24 +0000)]
Prevent the -g option from preserving groups that a non-root receiver
does not belong to, in these two ways:
    1. If a group mapping doesn't exist for a group name, do not preserve
it for a non-root receiver.  This is especially evident with the
sender is a daemon using chroot because then no mappings are
available.
    2. Before setting the group on a file make sure that it is in the list
of groups returned by getgroups().  The same thing is done by chgrp
on systems that support bsd-style chown/chgrp, and this enforces
that it happens the same way on all systems.  Overhead is very
little, especially since most systems don't allow more then 16
groups per user.

20 years agoRemoved am_client variable. It was being set in one place, when a client
David Dykstra [Thu, 25 Feb 1999 17:58:31 +0000 (17:58 +0000)]
Removed am_client variable.  It was being set in one place, when a client
of a socket (that is, a --daemon) server, but never looked at.  The way to
test whether or not on a client is (!am_server).