Commit Graph

556 Commits

Author SHA1 Message Date
Andrew Tridgell
4df9f36841 solved the problem of not using the right permissions when
preserve_perms is off.
1999-10-31 04:28:03 +00:00
Andrew Tridgell
5c9730a46c added --address option for virtual hosting 1999-10-31 03:21:02 +00:00
Andrew Tridgell
d9fcc198cf added -P option
it is equivalent to --partial --progress
1999-10-31 02:47:30 +00:00
Andrew Tridgell
c831379436 updated test suite from Phil. 1999-10-31 02:39:34 +00:00
Andrew Tridgell
d73ee7b70e updated rsync-path man page entry 1999-10-31 02:37:21 +00:00
Andrew Tridgell
cda2ae84b3 added "ignore errors" option in rsyncd.conf 1999-10-31 02:19:24 +00:00
Andrew Tridgell
e7d6e0aa0c updated the configure test for fnmatch() to see if FNM_PATHNAME is
working correctly.
1999-10-27 13:17:16 +00:00
Andrew Tridgell
8c9fd200f9 use do_open() instead of open() in several places to help the WinXX port
and O_BINARY
1999-10-25 22:04:09 +00:00
David Dykstra
79f118d859 Minor change suggesting people put in the right path in inetd.conf.
Suggested by Roger Price <rprice@cs.uml.edu>
1999-10-19 17:50:39 +00:00
Andrew Tridgell
7b10f91d8f added a note about using -v with --progress 1999-09-06 02:04:20 +00:00
Andrew Tridgell
3d19b4c83e separated out the make_backup code in preparation for some patches
from Bob Edwards
1999-08-30 08:19:47 +00:00
David Dykstra
79452d4693 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.
1999-07-09 17:07:59 +00:00
David Dykstra
cb13abfed0 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.
1999-07-09 15:49:46 +00:00
Andrew Tridgell
0503f06089 continue calling waitpid() while still reapingchildren (patch from
Matti Aarnio)
1999-06-27 04:12:12 +00:00
Andrew Tridgell
f855a7d01a fixed a bug that made us use only 16 bits of the file checksum when
comparing checksums for the --checksum (-c) option.
1999-06-26 01:06:38 +00:00
Andrew Tridgell
4c3b4b2557 added RSYNC_PROXY support from Stephen Rothwell. This allows access to
rsync servers via a web proxy (useful for getting through firewalls)
1999-04-13 03:53:30 +00:00
rsync-bugs
79b5aa09a0 preparing for release of 2.3.1 v2.3.1 1999-04-06 15:09:28 +00:00
Andrew Tridgell
9bd6597666 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.
1999-04-06 14:52:32 +00:00
Andrew Tridgell
6fe076b3d7 these aren't used any more 1999-04-06 14:17:44 +00:00
Andrew Tridgell
cec8aa7724 handle the case of an empty file list in get_local_name 1999-04-06 12:30:36 +00:00
Andrew Tridgell
4c36a13ef2 don't abort the server side if the file list is empty (perhaps because
all files have been excluded).
1999-04-06 12:28:54 +00:00
Andrew Tridgell
24986abd07 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
1999-04-06 11:52:45 +00:00
Andrew Tridgell
8dfac376b5 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.
1999-04-06 11:34:06 +00:00
Andrew Tridgell
e78733d975 fixed a nasty bug in the handling of "local_name" when setting the
permissions on directories after a transfer.
1999-04-06 10:56:18 +00:00
Andrew Tridgell
dffba35e01 quote RPM_OPT_FLAGS
patch from racke@linuxia.de
1999-04-06 10:27:34 +00:00
David Dykstra
bd4ed7f719 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.
1999-04-02 18:24:27 +00:00
David Dykstra
752eaba41f 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.
1999-03-24 19:28:03 +00:00
David Dykstra
ad517ce5b3 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).
1999-03-24 16:39:07 +00:00
David Dykstra
1f8413449d 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.
1999-03-23 22:20:10 +00:00
rsync-bugs
d0a7c8a487 preparing for release of 2.3.0 v2.3.0 1999-03-15 21:23:26 +00:00
David Dykstra
ebb00c8e29 Changed the protocol version to 20 so that --stats will work without -v in
both directions.
1999-03-15 21:17:58 +00:00
David Dykstra
6543dc0c4c Fix typo in comment in rsync.h, suggested by bje@cygnus.com 1999-03-15 17:04:22 +00:00
David Dykstra
e459239d27 Make a special version number 2.3.0-beta for a short period because
I'll be encouraging extra testing before the release.
1999-03-12 21:45:37 +00:00
David Dykstra
651443a7ff Allow + and - in the "include" and "exclude" directives in rsyncd.conf.
Patch submitted by Damian A Ivereigh <damian@cisco.com>
1999-03-12 21:42:51 +00:00
David Dykstra
79fc6bdb45 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.
1999-03-12 18:21:53 +00:00
David Dykstra
245fbb5129 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.
1999-03-12 17:36:52 +00:00
David Dykstra
c7c11a0d4c 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>
1999-03-11 22:17:42 +00:00
David Dykstra
c27f25922e 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.
1999-03-09 21:55:16 +00:00
David Dykstra
af21c12fbc Add distclean target to Makefile.in. 1999-03-09 21:47:18 +00:00
David Dykstra
32b1f1de0e Update config.sub to the latest from automake in addition to config.guess. 1999-03-09 21:46:15 +00:00
David Dykstra
529e60864f 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).
1999-03-05 16:37:44 +00:00
David Dykstra
972a3619c4 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.
1999-03-04 21:48:52 +00:00
David Dykstra
8458724d25 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.
1999-03-02 20:56:17 +00:00
David Dykstra
9422bb3fdf 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.
1999-03-02 16:42:46 +00:00
David Dykstra
5afd8aedce 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.
1999-03-01 21:22:54 +00:00
David Dykstra
86692050b5 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.
1999-03-01 21:16:49 +00:00
David Dykstra
460f6b990a 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.
1999-03-01 19:24:39 +00:00
David Dykstra
896bd482c0 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).
1999-02-25 17:58:31 +00:00
David Dykstra
53f821f1e6 Fix a bug with rsync -R --delete from ./ as reported in PR#1532 1999-02-24 22:38:36 +00:00
David Dykstra
b33b791e6b Add --delete-excluded option to delete files on the receiving side that
are excluded.  Implies --delete.
1999-02-22 19:55:57 +00:00