rsync/rsync.git
19 years agoUse MAX_MAP_SIZE in the args to map_file().
Wayne Davison [Tue, 3 Aug 2004 15:37:54 +0000 (15:37 +0000)]
Use MAX_MAP_SIZE in the args to map_file().

19 years ago- Changed the calling syntax for map_file() so that it takes both
Wayne Davison [Tue, 3 Aug 2004 08:05:29 +0000 (08:05 +0000)]
- Changed the calling syntax for map_file() so that it takes both
  a (possibly approximate) window size and an optional block size
  (which is used to round-up the window size if it is non-zero).
- Don't set window_start behind the supplied offset in map_ptr().

19 years agoCall map_file() with its new args, including a suggested window
Wayne Davison [Tue, 3 Aug 2004 08:05:27 +0000 (08:05 +0000)]
Call map_file() with its new args, including a suggested window
size.

19 years agoWe call map_ptr() with a data range than includes any unmatched data
Wayne Davison [Tue, 3 Aug 2004 08:05:23 +0000 (08:05 +0000)]
We call map_ptr() with a data range than includes any unmatched data
(which we might need to reference again) in addition to the current
rolling-checksum block (this prevents the unmatched data from being
lost when we slide the buffer and read more data).

19 years ago- Changed the description for --block-size in the --help text.
Wayne Davison [Tue, 3 Aug 2004 08:05:20 +0000 (08:05 +0000)]
- Changed the description for --block-size in the --help text.
- Use the new MAX_BLOCK_SIZE to limit the block_size value.

19 years ago- Added define for MAX_BLOCK_SIZE.
Wayne Davison [Tue, 3 Aug 2004 08:05:17 +0000 (08:05 +0000)]
- Added define for MAX_BLOCK_SIZE.
- Increased the MAX_MAP_SIZE.

19 years agoUpdated the description of the --block-size option.
Wayne Davison [Tue, 3 Aug 2004 07:58:48 +0000 (07:58 +0000)]
Updated the description of the --block-size option.

19 years agoMention the open64()/mkstemp64() configure change.
Wayne Davison [Mon, 2 Aug 2004 22:06:17 +0000 (22:06 +0000)]
Mention the open64()/mkstemp64() configure change.

19 years agoDon't use mkstemp() if the OS has open64() but not mkstemp64().
Wayne Davison [Mon, 2 Aug 2004 21:56:07 +0000 (21:56 +0000)]
Don't use mkstemp() if the OS has open64() but not mkstemp64().

19 years agoTest for functions open64() and mkstemp64().
Wayne Davison [Mon, 2 Aug 2004 21:54:49 +0000 (21:54 +0000)]
Test for functions open64() and mkstemp64().

19 years agoGot rid of trailing whitespace.
Wayne Davison [Mon, 2 Aug 2004 16:49:20 +0000 (16:49 +0000)]
Got rid of trailing whitespace.

19 years agoMention the "refuse options" change.
Wayne Davison [Mon, 2 Aug 2004 07:41:04 +0000 (07:41 +0000)]
Mention the "refuse options" change.

19 years agoAllow better wildcard matching against the short-option letters in
Wayne Davison [Mon, 2 Aug 2004 07:40:34 +0000 (07:40 +0000)]
Allow better wildcard matching against the short-option letters in
the "refuse options" handling.

19 years agoDocument the improved "refuse options" syntax.
Wayne Davison [Mon, 2 Aug 2004 05:01:36 +0000 (05:01 +0000)]
Document the improved "refuse options" syntax.

19 years ago- Extended the "refuse options" daemon setting to allow wildcards
Wayne Davison [Mon, 2 Aug 2004 05:00:30 +0000 (05:00 +0000)]
- Extended the "refuse options" daemon setting to allow wildcards
  and to allow single-letter option names.
- No need to send the various --delete* options or the --force option
  from the receiver to the sender.

19 years agoGot rid of unused externs.
Wayne Davison [Mon, 2 Aug 2004 04:50:33 +0000 (04:50 +0000)]
Got rid of unused externs.

19 years ago- Changed "read so far" to "received so far".
Wayne Davison [Mon, 2 Aug 2004 02:43:54 +0000 (02:43 +0000)]
- Changed "read so far" to "received so far".
- Output the who_am_i() information in the socket read/write errors to
  make it a little clearer who is complaining about what (for those
  familiar with rsync, at least -- e.g. it will help when users report
  errors).

19 years ago- Changed all the errors in parse_arguments() to use the err_buf so
Wayne Davison [Sat, 31 Jul 2004 20:09:54 +0000 (20:09 +0000)]
- Changed all the errors in parse_arguments() to use the err_buf so
  that a client talking to a daemon server actually gets the error.
- If a daemon has a list of exclusions, apply that list to various
  options to ensure that an excluded file can't be affected.
- Fixed an arg-checking problem when --files-from got passed to a
  daemon.

19 years agoIf we need to return an error during the startup phase and the other
Wayne Davison [Sat, 31 Jul 2004 19:55:42 +0000 (19:55 +0000)]
If we need to return an error during the startup phase and the other
side is expecting us to send them a files-from list, send the list
terminator before sending the error.

19 years agoDon't allow a --partial-dir setting to overwrite a server-excluded
Wayne Davison [Sat, 31 Jul 2004 18:13:20 +0000 (18:13 +0000)]
Don't allow a --partial-dir setting to overwrite a server-excluded
file (affects a daemon receiver only).

19 years ago- Document the change to --copy-links.
Wayne Davison [Sat, 31 Jul 2004 16:20:28 +0000 (16:20 +0000)]
- Document the change to --copy-links.
- Improved the "OUTPUT CHANGES" section.

19 years agoDocument the old side-effect to --copy-links and that it no longer
Wayne Davison [Sat, 31 Jul 2004 16:19:14 +0000 (16:19 +0000)]
Document the old side-effect to --copy-links and that it no longer
happens in a modern rsync w/o --keep-dirlinks.

19 years agoOne call to link_stat() (in set_perms()) needed to honor the setting
Wayne Davison [Sat, 31 Jul 2004 16:15:41 +0000 (16:15 +0000)]
One call to link_stat() (in set_perms()) needed to honor the setting
of keep_dirlinks if the current item is a directory.

19 years agoReset copy_links in the receiver.
Wayne Davison [Sat, 31 Jul 2004 16:14:27 +0000 (16:14 +0000)]
Reset copy_links in the receiver.

19 years agoProminently mention the changes to the text that gets output.
Wayne Davison [Sat, 31 Jul 2004 03:33:05 +0000 (03:33 +0000)]
Prominently mention the changes to the text that gets output.

19 years agoChanged "wrote"/"written" to "sent" and "read" to "received" in
Wayne Davison [Sat, 31 Jul 2004 03:32:42 +0000 (03:32 +0000)]
Changed "wrote"/"written" to "sent" and "read" to "received" in
the text that is output.

19 years ago- Mention the "list = no" change in error handling.
Wayne Davison [Fri, 30 Jul 2004 22:46:07 +0000 (22:46 +0000)]
- Mention the "list = no" change in error handling.
- Improved a few of the NEWS items.

19 years agoIf someone is denied access to a "list = no" module, lie and tell them
Wayne Davison [Fri, 30 Jul 2004 20:07:52 +0000 (20:07 +0000)]
If someone is denied access to a "list = no" module, lie and tell them
that the module is "Unknown" (so the user can't probe to find unlisted
modules).

19 years agoDon't ignore case in lp_number() because the rest of the daemon code
Wayne Davison [Fri, 30 Jul 2004 20:05:37 +0000 (20:05 +0000)]
Don't ignore case in lp_number() because the rest of the daemon code
can't handle the case where the module name doesn't exactly match the
string the user provided.

19 years agoIf we reject a name due to a server-exclude, someone is trying to hack
Wayne Davison [Fri, 30 Jul 2004 07:02:37 +0000 (07:02 +0000)]
If we reject a name due to a server-exclude, someone is trying to hack
rsync (because the generator would not have included this file).  Respond
with an exit.

19 years agoDocument the latest changes.
Wayne Davison [Thu, 29 Jul 2004 18:08:16 +0000 (18:08 +0000)]
Document the latest changes.

19 years agoGot rid of bogus compare_dest scan in skip_file() -- it must checksum
Wayne Davison [Thu, 29 Jul 2004 16:45:48 +0000 (16:45 +0000)]
Got rid of bogus compare_dest scan in skip_file() -- it must checksum
the same file that we used for the stat() (in the parent routine).

19 years agoAdded the new --partial-dir option.
Wayne Davison [Thu, 29 Jul 2004 16:06:38 +0000 (16:06 +0000)]
Added the new --partial-dir option.

19 years agoDocument the new --partial-dir option.
Wayne Davison [Thu, 29 Jul 2004 16:06:34 +0000 (16:06 +0000)]
Document the new --partial-dir option.

19 years agoCheck the error return of flush_write_file().
Wayne Davison [Thu, 29 Jul 2004 07:37:27 +0000 (07:37 +0000)]
Check the error return of flush_write_file().

19 years agoAdded close_multiplexing_in() and renamed io_multiplexing_close()
Wayne Davison [Thu, 29 Jul 2004 07:24:45 +0000 (07:24 +0000)]
Added close_multiplexing_in() and renamed io_multiplexing_close()
to close_multiplexing_out().

19 years agoCall the new close_multiplexing_in() function in the generator.
Wayne Davison [Thu, 29 Jul 2004 07:24:00 +0000 (07:24 +0000)]
Call the new close_multiplexing_in() function in the generator.

19 years agoIf we fail writing to the socket and we're receiving error messages
Wayne Davison [Thu, 29 Jul 2004 07:09:46 +0000 (07:09 +0000)]
If we fail writing to the socket and we're receiving error messages
from the other side via a multiplexed input, read the socket to see
if we get some errors that would explain why they went away.

19 years agoOne more inplace code tweak.
Wayne Davison [Thu, 29 Jul 2004 06:59:30 +0000 (06:59 +0000)]
One more inplace code tweak.

19 years agoSome minor fixes and improvements for the inplace code.
Wayne Davison [Thu, 29 Jul 2004 06:40:26 +0000 (06:40 +0000)]
Some minor fixes and improvements for the inplace code.

19 years ago- Explicitly save the stat()'s errno so that we can be sure we're
Wayne Davison [Wed, 28 Jul 2004 10:04:06 +0000 (10:04 +0000)]
- Explicitly save the stat()'s errno so that we can be sure we're
  testing the right thing lower down (and so that future code doesn't
  always have to remember to save it off and restore it).
- Improved a chunk of link_dest code.
- Handle the removal of a non-regular file without so much duplicated
  code.

19 years agoUse the new safe_fname() function.
Wayne Davison [Mon, 26 Jul 2004 16:36:59 +0000 (16:36 +0000)]
Use the new safe_fname() function.

19 years agoAllow safe_fname() to tweak up to two name at a time.
Wayne Davison [Mon, 26 Jul 2004 16:34:36 +0000 (16:34 +0000)]
Allow safe_fname() to tweak up to two name at a time.

19 years agoUse safe_fname() in full_fname().
Wayne Davison [Mon, 26 Jul 2004 15:59:51 +0000 (15:59 +0000)]
Use safe_fname() in full_fname().

19 years agoAdded safe_fname() that converts any newlines in a name into '?'s.
Wayne Davison [Mon, 26 Jul 2004 15:52:25 +0000 (15:52 +0000)]
Added safe_fname() that converts any newlines in a name into '?'s.

19 years agoMade a comment better.
Wayne Davison [Mon, 26 Jul 2004 05:38:02 +0000 (05:38 +0000)]
Made a comment better.

19 years agoSome batch-mode changes.
Wayne Davison [Sat, 24 Jul 2004 16:51:58 +0000 (16:51 +0000)]
Some batch-mode changes.

19 years agoMade the new option-twiddling message only output when verbose.
Wayne Davison [Sat, 24 Jul 2004 16:51:16 +0000 (16:51 +0000)]
Made the new option-twiddling message only output when verbose.

19 years agoCall read_stream_flags() as soon as we open the batch file for
Wayne Davison [Sat, 24 Jul 2004 16:40:41 +0000 (16:40 +0000)]
Call read_stream_flags() as soon as we open the batch file for
reading.

19 years agoCall write_stream_flags() from start_write_batch().
Wayne Davison [Sat, 24 Jul 2004 16:39:53 +0000 (16:39 +0000)]
Call write_stream_flags() from start_write_batch().

19 years agoAdded write_stream_flags() to write the state of certain flags into
Wayne Davison [Sat, 24 Jul 2004 16:38:49 +0000 (16:38 +0000)]
Added write_stream_flags() to write the state of certain flags into
the batchfile and read_stream_flags() to read and twiddle the same
flags.  This ensures that the batchfile reading doesn't get confused
about what data to expect from the socket.

19 years agoTweaked a compound line.
Wayne Davison [Fri, 23 Jul 2004 16:59:38 +0000 (16:59 +0000)]
Tweaked a compound line.

19 years agoAdded a comment.
Wayne Davison [Fri, 23 Jul 2004 16:59:22 +0000 (16:59 +0000)]
Added a comment.

19 years agoSome basic batch-mode tests.
Wayne Davison [Fri, 23 Jul 2004 02:13:34 +0000 (02:13 +0000)]
Some basic batch-mode tests.

19 years agoChris added a missing "not" to a comment.
Wayne Davison [Fri, 23 Jul 2004 01:40:22 +0000 (01:40 +0000)]
Chris added a missing "not" to a comment.

19 years agoFixed the opening comments.
Wayne Davison [Fri, 23 Jul 2004 01:39:19 +0000 (01:39 +0000)]
Fixed the opening comments.

19 years agoIf we sucessfully renamed a file that has multiple links to it, unlink()
Wayne Davison [Thu, 22 Jul 2004 22:52:39 +0000 (22:52 +0000)]
If we sucessfully renamed a file that has multiple links to it, unlink()
it to ensure that rename() didn't lie to us (which it does if you try to
rename() a file over another link to the same file).

19 years agoChanged NO_INT64 to INT64_IS_OFF_T because off_t might actually be
Wayne Davison [Thu, 22 Jul 2004 19:28:45 +0000 (19:28 +0000)]
Changed NO_INT64 to INT64_IS_OFF_T because off_t might actually be
64 bits.  The code now only complains if int64 is really too short.

19 years agoSome --help text fixes.
Wayne Davison [Thu, 22 Jul 2004 15:43:28 +0000 (15:43 +0000)]
Some --help text fixes.

19 years agoSome more --inplace improvements.
Wayne Davison [Thu, 22 Jul 2004 15:41:09 +0000 (15:41 +0000)]
Some more --inplace improvements.

19 years agoShould always call finish_transfer() for inplace handling, just like
Wayne Davison [Thu, 22 Jul 2004 15:31:06 +0000 (15:31 +0000)]
Should always call finish_transfer() for inplace handling, just like
for keep_partial handling.

19 years agoThe inplace handling in finish_transfer() now passes PERMS_SKIP_MTIME
Wayne Davison [Thu, 22 Jul 2004 15:30:04 +0000 (15:30 +0000)]
The inplace handling in finish_transfer() now passes PERMS_SKIP_MTIME
to set_perms() if ok_to_set_time wasn't specified.

19 years agoNeed to output the "failed verification" error before sending the
Wayne Davison [Thu, 22 Jul 2004 08:16:35 +0000 (08:16 +0000)]
Need to output the "failed verification" error before sending the
MSG_REDO so that the output comes out in the right order.

19 years agoAdded a warning message when a file fails to verify, letting the user
Wayne Davison [Thu, 22 Jul 2004 04:15:18 +0000 (04:15 +0000)]
Added a warning message when a file fails to verify, letting the user
know if we retained it or discarded it.  Especially useful for batch-
reading mode where the old code could look like it did the update when
it really silently failed.

19 years agoAdded even more double-quoting.
Wayne Davison [Thu, 22 Jul 2004 03:23:04 +0000 (03:23 +0000)]
Added even more double-quoting.

19 years agoNo need to check both delete_after and delete_mode since the former
Wayne Davison [Thu, 22 Jul 2004 02:52:57 +0000 (02:52 +0000)]
No need to check both delete_after and delete_mode since the former
implies the latter.

19 years agoIn read_batch mode, we read ints from the new batch_gen_fd pipe and
Wayne Davison [Wed, 21 Jul 2004 23:59:37 +0000 (23:59 +0000)]
In read_batch mode, we read ints from the new batch_gen_fd pipe and
only process the updates from the batch file when the generator has
indicated that it is ready (which ensures that all the necessary
dirs have been created).

19 years agoGot rid of read_batch special case.
Wayne Davison [Wed, 21 Jul 2004 23:59:33 +0000 (23:59 +0000)]
Got rid of read_batch special case.

19 years agoSetup for read_batch mode a little differently:
Wayne Davison [Wed, 21 Jul 2004 23:59:31 +0000 (23:59 +0000)]
Setup for read_batch mode a little differently:
- Avoid calling local_child().
- Create a pipe that lets the generator send us index values.
- Set batch_gen_fd for the receiver to read the pipe.

19 years agoAdded batch_gen_fd.
Wayne Davison [Wed, 21 Jul 2004 23:59:28 +0000 (23:59 +0000)]
Added batch_gen_fd.

19 years agoIn read_batch mode, we now let the code write out the index value
Wayne Davison [Wed, 21 Jul 2004 23:59:25 +0000 (23:59 +0000)]
In read_batch mode, we now let the code write out the index value
to the f_out pipe before we return from recv_generator().  This gives
the receiver something to sync with so that it doesn't rush ahead of
us (which could be bad if we didn't have a chance to create the
destination dirs yet).

19 years agoDon't write out the protocol_version number in read_batch mode.
Wayne Davison [Wed, 21 Jul 2004 23:59:22 +0000 (23:59 +0000)]
Don't write out the protocol_version number in read_batch mode.

19 years agoComplain if the user combines --read-batch with --files-from.
Wayne Davison [Wed, 21 Jul 2004 22:50:11 +0000 (22:50 +0000)]
Complain if the user combines --read-batch with --files-from.

19 years agoImproved the test a little.
Wayne Davison [Wed, 21 Jul 2004 21:06:13 +0000 (21:06 +0000)]
Improved the test a little.

19 years agoAdding a test for the --compare-dest option.
Wayne Davison [Wed, 21 Jul 2004 20:58:32 +0000 (20:58 +0000)]
Adding a test for the --compare-dest option.

19 years agoA couple am_sender checks (one negated) were not needed.
Wayne Davison [Wed, 21 Jul 2004 20:17:02 +0000 (20:17 +0000)]
A couple am_sender checks (one negated) were not needed.

19 years agoCall map_file() with the new block_size arg (had to delay the
Wayne Davison [Tue, 20 Jul 2004 21:35:58 +0000 (21:35 +0000)]
Call map_file() with the new block_size arg (had to delay the
call to map_file() until the block size was known).

19 years ago- Call map_file() with the new block_size arg (had to delay the
Wayne Davison [Tue, 20 Jul 2004 21:35:55 +0000 (21:35 +0000)]
- Call map_file() with the new block_size arg (had to delay the
  call to map_file() until the block size was known).
- Got rid of the setting of max_map_size.

19 years ago- Added a new block_size arg to map_file(). Use it to set the
Wayne Davison [Tue, 20 Jul 2004 21:35:52 +0000 (21:35 +0000)]
- Added a new block_size arg to map_file().  Use it to set the
  new def_window_size member variable.
- Got rid of max_map_size global (we use def_window_size now).

19 years ago- Got rid of cleanup_buf (map-file cleanup is not needed).
Wayne Davison [Tue, 20 Jul 2004 21:35:49 +0000 (21:35 +0000)]
- Got rid of cleanup_buf (map-file cleanup is not needed).
- Renamed the cleanup_fd* vars.

19 years agoCall map_file() with its new block_size arg.
Wayne Davison [Tue, 20 Jul 2004 21:35:46 +0000 (21:35 +0000)]
Call map_file() with its new block_size arg.

19 years agoTweaked an error message.
Wayne Davison [Tue, 20 Jul 2004 21:10:20 +0000 (21:10 +0000)]
Tweaked an error message.

19 years agoAdded a def_window_size variable to struct map_struct.
Wayne Davison [Tue, 20 Jul 2004 21:08:33 +0000 (21:08 +0000)]
Added a def_window_size variable to struct map_struct.

19 years ago- More batch-file improvements.
Wayne Davison [Tue, 20 Jul 2004 18:12:50 +0000 (18:12 +0000)]
- More batch-file improvements.
- A few spelling fixes.

19 years agoWe now append the exclude list as a "here" document to the end of
Wayne Davison [Tue, 20 Jul 2004 17:07:55 +0000 (17:07 +0000)]
We now append the exclude list as a "here" document to the end of
the BATCH.sh file.

19 years agoMade write_sbuf() non-static.
Wayne Davison [Tue, 20 Jul 2004 16:57:18 +0000 (16:57 +0000)]
Made write_sbuf() non-static.

19 years agoChanged write_batch_argvs_file() to new write_batch_shell_file()
Wayne Davison [Mon, 19 Jul 2004 17:11:41 +0000 (17:11 +0000)]
Changed write_batch_argvs_file() to new write_batch_shell_file()
call (with extra arg).

19 years agoAdded new function discard_receive_data().
Wayne Davison [Mon, 19 Jul 2004 17:05:01 +0000 (17:05 +0000)]
Added new function discard_receive_data().

19 years ago- Don't allow some crafty user to try to force us to update a
Wayne Davison [Mon, 19 Jul 2004 16:37:30 +0000 (16:37 +0000)]
- Don't allow some crafty user to try to force us to update a
  server-excluded file.
- If get_tmpname() fails we need to discard the update using
  receive_data().

19 years agoDo a better job of writing out the BATCH.sh file (i.e. quote special
Wayne Davison [Mon, 19 Jul 2004 08:27:17 +0000 (08:27 +0000)]
Do a better job of writing out the BATCH.sh file (i.e. quote special
characters and spaces in args, omit all the source args, omit the
include/exclude args if we can).

19 years agoChanged batch.rsync_argvs to batch.sh.
Wayne Davison [Mon, 19 Jul 2004 03:59:35 +0000 (03:59 +0000)]
Changed batch.rsync_argvs to batch.sh.

19 years agoFixed the argv munging to work properly regardless of whether the
Wayne Davison [Mon, 19 Jul 2004 00:53:49 +0000 (00:53 +0000)]
Fixed the argv munging to work properly regardless of whether the
user specified a trailing '=VALUE' or put the value in a separate
arg.

19 years agoA very minor optimization was made to read_sbuf(), read_byte(),
Wayne Davison [Sat, 17 Jul 2004 21:17:34 +0000 (21:17 +0000)]
A very minor optimization was made to read_sbuf(), read_byte(),
write_sbuf(), and write_byte().

19 years ago- Improved the warning about --inplace.
Wayne Davison [Sat, 17 Jul 2004 16:44:16 +0000 (16:44 +0000)]
- Improved the warning about --inplace.
- Fixed the sentence describing how to read standard input with
  --read-batch.

19 years agoMoved the read_batch abort check below the code that handles the
Wayne Davison [Sat, 17 Jul 2004 16:29:10 +0000 (16:29 +0000)]
Moved the read_batch abort check below the code that handles the
symlinks and devices.

19 years agoRevamped some of the io variables and calls to make the various I/O
Wayne Davison [Sat, 17 Jul 2004 15:20:00 +0000 (15:20 +0000)]
Revamped some of the io variables and calls to make the various I/O
functions seemlessly work on fds that aren't for the main socket. This
involved changing some fd-variable names (to make them clearer), adding
io_set_sock_fds(), and making input buffering have a better enabled
flag (via an allocated buffer, just like the output buffering).  I also
got rid of the fd arg to some functions where the fd arg could only
specify the input or output fd for the socket (which we already know).

19 years agoGot rid of the arg to io_start_multiplex_out().
Wayne Davison [Sat, 17 Jul 2004 15:19:57 +0000 (15:19 +0000)]
Got rid of the arg to io_start_multiplex_out().

19 years ago- Got rid of the arg to the io_start_multiplex_{in,out}() calls.
Wayne Davison [Sat, 17 Jul 2004 15:19:54 +0000 (15:19 +0000)]
- Got rid of the arg to the io_start_multiplex_{in,out}() calls.
- Call io_set_sock_fds().

19 years agoChanged a MIN() to a MAX() when setting max_map_size.
Wayne Davison [Sat, 17 Jul 2004 10:59:14 +0000 (10:59 +0000)]
Changed a MIN() to a MAX() when setting max_map_size.

19 years agoMention the new --inplace option.
Wayne Davison [Sat, 17 Jul 2004 00:00:27 +0000 (00:00 +0000)]
Mention the new --inplace option.