Commit Graph

385 Commits

Author SHA1 Message Date
Wayne Davison
485a40318c Protect a remote filename that starts with a dash. 2010-12-23 22:08:34 -08:00
Wayne Davison
8e918e1861 Make an empty-string dest-dir the same as "." again. 2010-07-03 08:23:31 -07:00
Wayne Davison
55dbbdeafe Fixed inconsistencies reported by packaging/var-checker. 2010-06-30 09:17:26 -07:00
Wayne Davison
d94b958400 Improve --timeout method to take into account all socket I/O that is
going on.  The receiving side also switches timeout handling from the
receiver to the generator.  Given this setup, all keep-alive messages
are now sent as empty MSG_DATA messages, with MSG_NOOP messages only
being understood and (when necessary) acted upon to forward a keep-alive
event to an older receiver.  This is both safer and more compatible with
older versions.
2009-12-19 13:39:49 -08:00
Wayne Davison
79731940bb Added an am_receiver variable. 2009-12-19 12:04:25 -08:00
Wayne Davison
9493048c10 Ensure that the sender turns off any msg_fd_in use earlier.
This avoids a problem where an extra message from the sender
could give the generator time to start sending data that will
not be understood by the sender's use of read_msg_fd().
2009-02-04 18:27:07 -08:00
Wayne Davison
445640e803 Update the copyright year. 2009-01-17 13:41:35 -08:00
Wayne Davison
b8fd528794 Fixed a glitch when using -s with a remote-shell daemon. 2008-10-11 11:14:43 -07:00
Wayne Davison
d47ac91209 Properly ignore source args on a --read-batch command. 2008-09-26 21:34:40 -07:00
Wayne Davison
deea1f70bd Got rid of the check_for_io_err code, as it could cause a hang.
The io_error issue will be fixed in a better way in 3.1.0.
2008-08-31 09:51:29 -07:00
Wayne Davison
7790ee3684 Added logic to the receiving side to ensure that the --delete-during
code will not delete in a directory prior to receiving an I/O error
for that directory (or not receiving it, as the case may be).
2008-08-02 09:03:49 -07:00
Wayne Davison
164cb66add Fixed the destination path check so that it cannot exclude a
dot dir.
2008-05-31 14:51:38 -07:00
Wayne Davison
311676ed21 Fixed a problem with how the daemon filters deal with
a destination directory with a trailing slash.
2008-04-16 09:32:22 -07:00
Wayne Davison
29a89172f7 Improved the chdir() code:
- Renamed push_dir() to change_dir() and revised it a little so that it
  can chdir() to a relative path without an intervening chdir() back to
  the staring path.
- Renamed push_pathname() to change_pathname() and revised it to take
  different args and to only call path_is_daemon_excluded() on a new
  path (not a revisit of a file's already-checked path).
- Fixed change_pathname() to set the right pathname value when a chdir()
  call fails.
- Set orig_dir once outside of the change_pathname() function.
- Got rid of pop_dir().
2008-03-30 15:44:46 -07:00
Wayne Davison
1df02d13d3 Don't send daemon-config filter-action messages back to the user. 2008-03-24 10:14:59 -07:00
Wayne Davison
73cb6738b3 Improved --dirs/--no-dirs/--list-only option handling:
- Moved setting of list_only and xfer_dirs from main.c to options.c.
- Fixed the ability of the user to force --no-dirs.
- Added the --old-dirs/--old-d option to make it easier to interact
  in list-only mode with an older rsync.
- Suggest the use of --old-d instead of "-r --exclude='/*/*'".
2008-03-24 09:54:04 -07:00
Wayne Davison
d48810ba5b Some improvements to the file-name cleaning code:
- Removed the CFN_KEEP_LEADING_DOT_DIR flag for clean_fname().
- Explicitly add an implied dot-dir to the transfer rather than keeping
  a leading a "./" prefix as a part of a relative pathname.
- Added the CFN_KEEP_DOT_DIRS flag for clean_fname().
- Added the SP_KEEP_DOT_DIRS flag for sanitize_path().
- Call clean_fname() a couple more times.
2008-03-20 22:39:29 -07:00
Wayne Davison
819bfe4599 Changed the name of the server_filter_list to be
daemon_filter_list, for improved clarity.
2008-03-20 10:42:43 -07:00
Wayne Davison
99c3e591b2 Reject a daemon-excluded destination. 2008-03-18 09:44:42 -07:00
Wayne Davison
aa0e6b9977 Attempting to silence some more "checker" warnings. 2008-03-17 07:35:19 -07:00
Wayne Davison
53936ef935 Fixed the use of --protect-args (-s) with a daemon. 2008-03-15 11:56:18 -07:00
Wayne Davison
d3d07a5e86 Include 2008 in the copyright years. 2008-03-01 12:01:41 -08:00
Wayne Davison
01103e1870 Make do_recv() reset copy_unsafe_links too (just like it does for
copy_links and copy_dirlinks).
2008-02-09 21:33:13 -08:00
Wayne Davison
42a28d9d3a Improved a comment. 2008-01-26 09:13:19 -08:00
Wayne Davison
19284e2ef8 When removing a file/dir that is owned by us but does not have
owner-write permission, set it before the removal.
2008-01-26 08:47:02 -08:00
Wayne Davison
641dc0c51e Output (BATCH ONLY) rather than (DRY RUN) for --only-write-batch. 2008-01-19 11:20:42 -08:00
Wayne Davison
a10186910d Fixed the check_filter() calls that might be checking an absolute path
in "use chroot = no" mode against a daemon's exclude restriction.
2007-12-16 14:16:37 -08:00
Wayne Davison
ce27f36d92 Check on the alternate destination dirs and report any problems. 2007-12-15 08:19:56 -08:00
Wayne Davison
ba22c9e219 Adding --contimeout=SECONDS option. 2007-11-28 00:28:26 -08:00
Wayne Davison
3f0211b63a New logging categories added to allow differentiation between
transfer errors, normal errors, and warnings.  New messages are
translated into old FERROR/FINFO categories for older protocols.
2007-11-22 10:05:36 -08:00
Wayne Davison
29bca53f9b Got rid of the unused symlink parameter to sanitize_path(). 2007-11-20 17:37:53 -08:00
Wayne Davison
879b6ad05c When performing a --dry-run, output a "(DRY RUN)" reminder on the
last line of the verbose summary text.
2007-11-09 04:48:10 +00:00
Wayne Davison
e844a4a8a8 When listing a bare module name w/o -r, make sure we list the
contents of the module's root directory.
2007-10-27 02:19:49 +00:00
Wayne Davison
ea4e8cf8a1 Call set_allow_inc_recurse() for situations that don't call server_options(). 2007-10-16 15:10:17 +00:00
Wayne Davison
44c4492acf Conditionalize the call to setup_iconv(). 2007-10-10 19:24:35 +00:00
Wayne Davison
b61665d5b6 Reposition the call to setup_iconv() so that it gets called only once
is a local_server copy, and so that arg-parsing code doesn't interfere
with the sending of a remote charset value.
2007-10-07 20:43:49 +00:00
Wayne Davison
26bbb6aa4b Set xfer_dirs when we set list_only. 2007-10-07 03:52:24 +00:00
Wayne Davison
a960239f39 Allow additional remote args to contain an identical hostname instead
of requiring it to be empty.  This allows for the easy use of braces:
rsync -av host:file{1,2} /dest/
2007-09-30 07:14:16 +00:00
Wayne Davison
7341ee2dfd Fixed a crash bug in get_local_name() when the file list is empty. 2007-09-23 21:54:03 +00:00
Wayne Davison
1b42f628f4 Moved inline functions from rsync.h into ifuncs.h. 2007-09-22 16:52:58 +00:00
Wayne Davison
71605b0f4d - Make use of new iconvbufs() function.
- Convert protected args when -s and --iconv are active.
- Simplified the splitting of args between normal and protected.
- Relocated setup_iconv() call so that it takes effect earlier.
2007-09-18 01:11:49 +00:00
Wayne Davison
288b12eefe We set FLAG_DIR_CREATED on a dot dir that got created by
get_local_name() rather than using the (now removed)
new_root_dir global.
2007-09-15 19:58:12 +00:00
Wayne Davison
da1319128a - Parse hard-link info as soon as we get it in inc_recurse mode.
- Improve the chances of the generator finding a match for a
  hard-link file in inc_recurse mode.
2007-09-15 15:40:57 +00:00
Wayne Davison
f7e5068d94 - If the user specifies a source arg with a hostspec in it in a local-
source transer, complain and exit.  This can help to find option
  problems were an arg to an option turns into a local-source arg,
  and the real remote-source arg will now get rejected rather than
  attempting to find a file with a colon in its name.
- We now support the ability to specify more than one remote arg using
  the ":FILENAME" idiom for additional remote filenames.
- If the --protect-args (-s) option was specified, we send just the
  "--server -s" options to the remote rsync when it is starting, and
  then the real args are sent over the socket.
2007-09-09 07:53:15 +00:00
Wayne Davison
d4d6646aae Changes to allow hard-linking to work in inc_recurse mode. 2007-09-03 21:21:17 +00:00
Wayne Davison
e208631a5b Improved the arg-checking of a daemon command. 2007-08-11 16:53:31 +00:00
Wayne Davison
8e41b68e8f Tweaking the license text a bit more. 2007-07-10 13:55:49 +00:00
Wayne Davison
9decb4d2ef Changed "count" to "used" in struct file_list since there can
be empty items that make the count inaccurate (and the name
somewhat deceiving).
2007-07-07 20:22:05 +00:00
Wayne Davison
4fd842f98d Switching to GPL 3. 2007-07-07 05:33:14 +00:00
Wayne Davison
332cf6df7c The --iconv option has now made it to the trunk. 2007-04-26 05:53:13 +00:00