Wayne Davison [Thu, 23 Jun 2005 15:58:57 +0000 (15:58 +0000)]
Changed the arg-splitting code so that it can handle a literal
backslash prior to whitespace without treating it as escaped
whitespace (e.g. if we receive "foo\\ bar", it is two args,
while "foo\ bar" and "foo\\\ bar" are each just one).
Wayne Davison [Fri, 17 Jun 2005 16:48:02 +0000 (16:48 +0000)]
- Improved some comments (some taken from the new cull-options output).
- Made the user-config sections easier to find.
- Default to running a fully-specified rsync executable so that there
are not PATH surprises.
- A few minor tweaks to the arg-checking code to make it clearer without
actually changing its logic.
Wayne Davison [Fri, 17 Jun 2005 04:50:22 +0000 (04:50 +0000)]
- Be restrictive on matching the --sender option so that the user
can't fool us into thinking we're the sender by using a filename
of --sender (or similar ploy).
- Make sure that our '..' check can't be fooled by sly backslashing.
- Tweaked some comments.
Wayne Davison [Thu, 16 Jun 2005 19:30:53 +0000 (19:30 +0000)]
- Made it easy to configure the path of the rsync executable.
- Fully parse all legal options that might come from a stock rsync and
validate/restrict any option's args (previously we rejected options
with args).
- Made it easy to disable specific options.
- Properly handle a multi-arg copy's multiple args.
- Make sure that the restricted dir actually exists and we can chdir
to it.
- Just reject any dangerous args that have .. in them instead of trying
to munge them.
- We don't treat single-or double-quotes specially, just backslash-
escaped characters.
- Turn on strict mode.
- Use the array-arg version of exec() so that we don't spawn a shell.
- Use File::Glob to glob wildcards in args.
- Tweaked the log-file format so that it logs the modified command
without any "OK" suffix.
Wayne Davison [Fri, 10 Jun 2005 20:33:57 +0000 (20:33 +0000)]
- Put the output we're expecting into an rsync.chk file, for easier
debugging on failures.
- Added the function filter_outfile() and used it in place of the
various output-filtering commands.
- Use the sed rules for filtering the combination of --itemized
output with double-verbose output so that we're sure there's no
superfluous lines being output (which the old grep filtering
would have ignored).
Wayne Davison [Fri, 10 Jun 2005 17:57:18 +0000 (17:57 +0000)]
Fixed a problem in the backing up of symlinks and devices: we
need to remove any old symlink/device/file to create the backup.
Also fixed a couple minor logic errors in the handling of symlinks
and devices. NOTE: the code still doesn't handle the changing of
a name from a dir to a non-dir or visa versa (which is a very old
deficiency in the code).
Wayne Davison [Thu, 9 Jun 2005 22:27:22 +0000 (22:27 +0000)]
- Fixed the overzealous outputting of unchanged hard-linked items
when verbose > 1.
- An unchanged hard-link with -i (log-format w/%i) now changes the
trailing dots to spaces.
Wayne Davison [Thu, 9 Jun 2005 21:56:11 +0000 (21:56 +0000)]
- Never output the '"FOO" is a hard link' message when -i (%i)
output is enabled.
- Go back to outputting '"FOO" is a hard link' message when -i (%i)
is not enabled and verbose > 1.
Wayne Davison [Fri, 27 May 2005 18:04:04 +0000 (18:04 +0000)]
If we unduplicate '.', make sure we also copy FLAG_DEL_HERE (in
addition to FLAG_TOP_DIR), so that the unduplication of a real
dir and an implied dir (implied by --relative) works right.
Wayne Davison [Sun, 22 May 2005 20:52:32 +0000 (20:52 +0000)]
- Don't stop deleting in a dir if one item fails.
- Don't skip deleting in a dir if the initial rmdir fails
(2.6.4 only continued if it was a non-empty error).
Wayne Davison [Thu, 19 May 2005 08:52:24 +0000 (08:52 +0000)]
Periodically call maybe_send_keepalive() when timeouts are in effect
(this ensures that the receiver doesn't timeout when we're still
doing work reading data from the generator).
Wayne Davison [Thu, 19 May 2005 08:52:19 +0000 (08:52 +0000)]
- Call the new set_io_timeout() function to set the timeout value.
- If the user specified a shorter timeout than the config-file,
don't override the shorter value.
Wayne Davison [Thu, 19 May 2005 08:52:13 +0000 (08:52 +0000)]
- Added set_io_timeout(), which sets all the timeout-dependent
variables when the timeout value changes.
- Split last_io into last_io_in and last_io_out.
- Made select_timeout static.
Wayne Davison [Sat, 14 May 2005 18:44:57 +0000 (18:44 +0000)]
Treat a trailing ".." dir-name as if "../" had been specified so
that we don't use the name in the destination path and save files
into a higher destination directory.
Wayne Davison [Thu, 12 May 2005 17:36:29 +0000 (17:36 +0000)]
Improved the use of the "remaining" var in readfd_unbuffered() to
make certain that the static value is always set correctly anytime
we call out to another function.