rsync/rsync.git
20 years agoIf --backup was specified, the links we remove are backed up.
Wayne Davison [Wed, 11 Feb 2004 05:03:04 +0000 (05:03 +0000)]
If --backup was specified, the links we remove are backed up.

20 years ago- Revised and optimized the directory-making code.
Wayne Davison [Wed, 11 Feb 2004 05:02:21 +0000 (05:02 +0000)]
- Revised and optimized the directory-making code.
- Optimized the keep_backup() code.

20 years agoAdded backup_dir_buf and backup_dir_remainder.
Wayne Davison [Wed, 11 Feb 2004 04:30:41 +0000 (04:30 +0000)]
Added backup_dir_buf and backup_dir_remainder.

20 years agoFixed a crash bug when keep_backup() calls make_file() and the lastdir
Wayne Davison [Wed, 11 Feb 2004 02:48:58 +0000 (02:48 +0000)]
Fixed a crash bug when keep_backup() calls make_file() and the lastdir
pointer is no longer valid.

20 years agoGot rid of hard-link message (since I don't think it was ever
Wayne Davison [Wed, 11 Feb 2004 02:33:17 +0000 (02:33 +0000)]
Got rid of hard-link message (since I don't think it was ever
output in older rsync versions).

20 years agoAnother attempt at measuring the minimum alignment for a system.
Wayne Davison [Tue, 10 Feb 2004 23:35:12 +0000 (23:35 +0000)]
Another attempt at measuring the minimum alignment for a system.

20 years agoSimplified test for hardlink in make_backup debug message to
J.W. Schultz [Tue, 10 Feb 2004 23:23:09 +0000 (23:23 +0000)]
Simplified test for hardlink in make_backup debug message to
avoid core-dump.

20 years agoGot rid of useless extern.
Wayne Davison [Tue, 10 Feb 2004 22:56:16 +0000 (22:56 +0000)]
Got rid of useless extern.

20 years agoTrying a different MINALIGN because of core dumps on the sparc-64
Wayne Davison [Tue, 10 Feb 2004 22:28:36 +0000 (22:28 +0000)]
Trying a different MINALIGN because of core dumps on the sparc-64
build-farm machines.

20 years agoRevert pool_alloc's use of bomb if pool == NULL.
J.W. Schultz [Tue, 10 Feb 2004 21:11:24 +0000 (21:11 +0000)]
Revert pool_alloc's use of bomb if pool == NULL.

20 years agoKeep in sync with protocol if idev data on stream but no hlink_pool.
J.W. Schultz [Tue, 10 Feb 2004 21:11:24 +0000 (21:11 +0000)]
Keep in sync with protocol if idev data on stream but no hlink_pool.

20 years agoIf XMIT_HAS_IDEV_DATA is set in receive_file_entry(), we now bomb out
Wayne Davison [Tue, 10 Feb 2004 17:53:52 +0000 (17:53 +0000)]
If XMIT_HAS_IDEV_DATA is set in receive_file_entry(), we now bomb out
if flist->hlink_pool isn't set (instead of neglecting to read the idev
info).

20 years agoIf we call pool_alloc() on a NULL pool, bomb out with an error.
Wayne Davison [Tue, 10 Feb 2004 17:52:31 +0000 (17:52 +0000)]
If we call pool_alloc() on a NULL pool, bomb out with an error.

20 years agoEmpty-line tweaks.
Wayne Davison [Tue, 10 Feb 2004 17:35:04 +0000 (17:35 +0000)]
Empty-line tweaks.

20 years agoChanged a while loop to a for loop.
Wayne Davison [Tue, 10 Feb 2004 17:34:05 +0000 (17:34 +0000)]
Changed a while loop to a for loop.

20 years agoTweaked an if.
Wayne Davison [Tue, 10 Feb 2004 17:28:59 +0000 (17:28 +0000)]
Tweaked an if.

20 years agoChanged flist_init() to use offsetof().
Wayne Davison [Tue, 10 Feb 2004 17:28:31 +0000 (17:28 +0000)]
Changed flist_init() to use offsetof().

20 years agoAdded lib/pool_alloc.h to the HEADERS.
Wayne Davison [Tue, 10 Feb 2004 17:06:11 +0000 (17:06 +0000)]
Added lib/pool_alloc.h to the HEADERS.

20 years agoDropped support for protocol versions less than 20 (2.3.0
J.W. Schultz [Tue, 10 Feb 2004 03:54:47 +0000 (03:54 +0000)]
Dropped support for protocol versions less than 20 (2.3.0
released 15 Mar 1999) and activated warnings for protocols
less than 25 (2.5.0 released 23 Aug 2001)

20 years agoAdded allocation pool code.
J.W. Schultz [Tue, 10 Feb 2004 03:26:41 +0000 (03:26 +0000)]
Added allocation pool code.

20 years agoMake idev, hlink and file_struct + strings use allocation
J.W. Schultz [Tue, 10 Feb 2004 03:23:37 +0000 (03:23 +0000)]
Make idev, hlink and file_struct + strings use allocation
pools.

20 years agoDie if we overflowed the args[] array when building up the remote
Wayne Davison [Mon, 9 Feb 2004 21:22:59 +0000 (21:22 +0000)]
Die if we overflowed the args[] array when building up the remote
command in do_cmd().

20 years agoThe batch-options now set checksum_seed to the appropriate fixed value.
Wayne Davison [Mon, 9 Feb 2004 18:32:54 +0000 (18:32 +0000)]
The batch-options now set checksum_seed to the appropriate fixed value.

20 years agoSet checksum_seed only if it is still zero.
Wayne Davison [Mon, 9 Feb 2004 18:32:53 +0000 (18:32 +0000)]
Set checksum_seed only if it is still zero.

20 years agoMade checksum_seed an extern.
Wayne Davison [Mon, 9 Feb 2004 18:32:52 +0000 (18:32 +0000)]
Made checksum_seed an extern.

20 years agoUse asprintf() in server_options() (plus a few more whitespace tweaks).
Wayne Davison [Mon, 9 Feb 2004 18:10:57 +0000 (18:10 +0000)]
Use asprintf() in server_options() (plus a few more whitespace tweaks).

20 years agoUpdated the sizeof syntax and tweaked some whitespace.
Wayne Davison [Mon, 9 Feb 2004 17:45:22 +0000 (17:45 +0000)]
Updated the sizeof syntax and tweaked some whitespace.

20 years agoGot rid of unused true/false defines.
Wayne Davison [Sat, 7 Feb 2004 18:40:52 +0000 (18:40 +0000)]
Got rid of unused true/false defines.

20 years agoMade a couple comments a little clearer.
Wayne Davison [Sat, 7 Feb 2004 00:12:40 +0000 (00:12 +0000)]
Made a couple comments a little clearer.

20 years agoGot rid of unused string_area struct.
Wayne Davison [Fri, 6 Feb 2004 15:33:15 +0000 (15:33 +0000)]
Got rid of unused string_area struct.

20 years agoStart flist with a more reasonable size, grow it linearly
J.W. Schultz [Fri, 6 Feb 2004 10:00:33 +0000 (10:00 +0000)]
Start flist with a more reasonable size, grow it linearly
once it reaches a largish size (16 million files) and make it
actually match the comments so it may be used to initialize
flists of known size (create_flist_from_batch()).

20 years agoUpdate TODO to reflect recent changes.
J.W. Schultz [Fri, 6 Feb 2004 07:26:15 +0000 (07:26 +0000)]
Update TODO to reflect recent changes.

Hardlink handling is improved.

String area code is gone for other reasons.

20 years agoFixed the indentation in init_flist().
Wayne Davison [Fri, 6 Feb 2004 07:19:57 +0000 (07:19 +0000)]
Fixed the indentation in init_flist().

20 years agoCorrect sizeof usage and other whitespace.
J.W. Schultz [Fri, 6 Feb 2004 04:51:09 +0000 (04:51 +0000)]
Correct sizeof usage and other whitespace.

20 years agoAdded a total memory allocated (allmem) line to
J.W. Schultz [Fri, 6 Feb 2004 01:56:25 +0000 (01:56 +0000)]
Added a total memory allocated (allmem) line to
show_malloc_stats.

20 years agoCause all three processes to report memory stats when -vv --stats
J.W. Schultz [Thu, 5 Feb 2004 03:27:54 +0000 (03:27 +0000)]
Cause all three processes to report memory stats when -vv --stats

20 years agoMention a couple more changes.
Wayne Davison [Thu, 5 Feb 2004 02:56:57 +0000 (02:56 +0000)]
Mention a couple more changes.

20 years agoNow that the long-standing chgrp bug is fixed, go back to -vvv from -vvvv.
Wayne Davison [Thu, 5 Feb 2004 01:37:08 +0000 (01:37 +0000)]
Now that the long-standing chgrp bug is fixed, go back to -vvv from -vvvv.

20 years agoFixed a problem handling GID_NONE in match_gid().
Wayne Davison [Thu, 5 Feb 2004 01:32:38 +0000 (01:32 +0000)]
Fixed a problem handling GID_NONE in match_gid().

20 years ago- Fixed a bug using --numeric-ids as non-root when the receiver
Wayne Davison [Thu, 5 Feb 2004 01:07:23 +0000 (01:07 +0000)]
- Fixed a bug using --numeric-ids as non-root when the receiver
  does not have permissions to set one or more of the gids.
- If the add_[ug]id() routine couldn't find a name for an ID, we
  still note the ID in our list of IDs so that we don't try to
  look it up again (and again).  (The name-less IDs are stripped
  when sending the IDs from the sender to the receiver.)
- Created a better add_to_list() function that handles the linking
  of the new node into the list (rather than the caller doing it).
- Added new internal functions for some receiver-side work that
  needed to be done in multiple places (the recv_add_[ug]id()
  functions).
- We output debug info even for ID mappings that have no names.
  This make the list complete and also notes which gids get
  mapped to -1 (GID_NONE).
- Turned several while loops into for loops.

20 years agoAdded new extern.
Wayne Davison [Thu, 5 Feb 2004 00:46:32 +0000 (00:46 +0000)]
Added new extern.

20 years agoOnly call add_uid() or add_gid() if numeric_ids is not set.
Wayne Davison [Thu, 5 Feb 2004 00:44:11 +0000 (00:44 +0000)]
Only call add_uid() or add_gid() if numeric_ids is not set.

20 years agoMoved a function.
Wayne Davison [Wed, 4 Feb 2004 20:09:21 +0000 (20:09 +0000)]
Moved a function.

20 years agoIf a gid doesn't have a name on the originating system, the receiver
Wayne Davison [Wed, 4 Feb 2004 19:25:11 +0000 (19:25 +0000)]
If a gid doesn't have a name on the originating system, the receiver
won't see it in the list of IDs to remap.  That means that we need to
call the is_in_group() function from inside match_gid() to know if we
can set the group or not (if we're not root).

20 years agoImproved the trailing comment.
Wayne Davison [Wed, 4 Feb 2004 18:24:41 +0000 (18:24 +0000)]
Improved the trailing comment.

20 years agoUse the new HAVE_GETGROUPS define.
Wayne Davison [Wed, 4 Feb 2004 17:49:36 +0000 (17:49 +0000)]
Use the new HAVE_GETGROUPS define.

20 years agoAdded function check for getgroups.
Wayne Davison [Wed, 4 Feb 2004 17:21:48 +0000 (17:21 +0000)]
Added function check for getgroups.

20 years agoUse MY_UID() instead of getuid().
Wayne Davison [Wed, 4 Feb 2004 17:06:07 +0000 (17:06 +0000)]
Use MY_UID() instead of getuid().

20 years agoUse MY_GID() instead of getgid().
Wayne Davison [Wed, 4 Feb 2004 17:05:44 +0000 (17:05 +0000)]
Use MY_GID() instead of getgid().

20 years agoAdded two defines: MY_UID() and MY_GID().
Wayne Davison [Wed, 4 Feb 2004 17:04:58 +0000 (17:04 +0000)]
Added two defines: MY_UID() and MY_GID().

20 years agoAdded getegid to the functions we check.
Wayne Davison [Wed, 4 Feb 2004 16:45:26 +0000 (16:45 +0000)]
Added getegid to the functions we check.

20 years agoAdded geteuid to the functions to check.
Wayne Davison [Wed, 4 Feb 2004 16:33:34 +0000 (16:33 +0000)]
Added geteuid to the functions to check.

20 years agoAnother improvement to the debug info we output.
Wayne Davison [Wed, 4 Feb 2004 16:27:47 +0000 (16:27 +0000)]
Another improvement to the debug info we output.

20 years agoSet the "max verbosity" global to 9.
Wayne Davison [Wed, 4 Feb 2004 07:32:48 +0000 (07:32 +0000)]
Set the "max verbosity" global to 9.

20 years agoUse the new lp_max_verbosity() value to limit the server's "verbose"
Wayne Davison [Wed, 4 Feb 2004 07:32:12 +0000 (07:32 +0000)]
Use the new lp_max_verbosity() value to limit the server's "verbose"
value.

20 years agoAdded "max verbosity" global parameter that allows you to configure
Wayne Davison [Wed, 4 Feb 2004 07:31:29 +0000 (07:31 +0000)]
Added "max verbosity" global parameter that allows you to configure
a higher debug level instead of the default of level-l verbosity.

20 years agoTweaked the new debug-logging strings.
Wayne Davison [Wed, 4 Feb 2004 07:24:13 +0000 (07:24 +0000)]
Tweaked the new debug-logging strings.

20 years agoTurned on 4 -v options for some build-farm testing.
Wayne Davison [Wed, 4 Feb 2004 06:15:24 +0000 (06:15 +0000)]
Turned on 4 -v options for some build-farm testing.

20 years agoIf we encounter an error, output the rsyncd.log file, if it exists.
Wayne Davison [Wed, 4 Feb 2004 05:34:29 +0000 (05:34 +0000)]
If we encounter an error, output the rsyncd.log file, if it exists.

20 years agoTemporarily switch to 4 -v options.
Wayne Davison [Wed, 4 Feb 2004 03:58:19 +0000 (03:58 +0000)]
Temporarily switch to 4 -v options.

20 years agoDelay the output the (verbose > 3) list of files until we've had a
Wayne Davison [Wed, 4 Feb 2004 03:52:51 +0000 (03:52 +0000)]
Delay the output the (verbose > 3) list of files until we've had a
chance to map the uid/gid info in the receiver.

20 years agoOutput some debug info if verbose > 3.
Wayne Davison [Wed, 4 Feb 2004 03:50:16 +0000 (03:50 +0000)]
Output some debug info if verbose > 3.

20 years agoIf we're dumping the file list (i.e. verbose > 3), mention the uid and/or
Wayne Davison [Wed, 4 Feb 2004 03:28:22 +0000 (03:28 +0000)]
If we're dumping the file list (i.e. verbose > 3), mention the uid and/or
gid (depending on applicability).

20 years agoChanged the -x code to allow -L to copy a file on another filesystem
Wayne Davison [Wed, 4 Feb 2004 03:25:18 +0000 (03:25 +0000)]
Changed the -x code to allow -L to copy a file on another filesystem
that is pointed to by a symlink on our exclusive filesystem.

20 years agoFixed a dropped '-'.
Wayne Davison [Wed, 4 Feb 2004 03:01:32 +0000 (03:01 +0000)]
Fixed a dropped '-'.

20 years agoAdded a little more compatibility code for non-standard systems.
Wayne Davison [Tue, 3 Feb 2004 23:28:19 +0000 (23:28 +0000)]
Added a little more compatibility code for non-standard systems.

20 years agoSome indentation fixes and the removal of some superfluous parens.
Wayne Davison [Tue, 3 Feb 2004 23:04:25 +0000 (23:04 +0000)]
Some indentation fixes and the removal of some superfluous parens.

20 years agoChanged a couple sizeof calls and improved some string handling in
Wayne Davison [Tue, 3 Feb 2004 23:01:58 +0000 (23:01 +0000)]
Changed a couple sizeof calls and improved some string handling in
the {send,recv}_exclude_list() calls.

20 years agoModified sizeof usage and eliminated trailing whitespace.
Wayne Davison [Tue, 3 Feb 2004 22:48:32 +0000 (22:48 +0000)]
Modified sizeof usage and eliminated trailing whitespace.

20 years agoAdded some temporary code to try to figure out what is going wrong
Wayne Davison [Tue, 3 Feb 2004 20:01:26 +0000 (20:01 +0000)]
Added some temporary code to try to figure out what is going wrong
on one NetBSD box in our build farm.

20 years agoIf verbose > 2, mention it if we're setting the uid or the gid.
Wayne Davison [Tue, 3 Feb 2004 20:00:35 +0000 (20:00 +0000)]
If verbose > 2, mention it if we're setting the uid or the gid.

20 years agocorrect sizeof usage.
J.W. Schultz [Tue, 3 Feb 2004 06:21:56 +0000 (06:21 +0000)]
correct sizeof usage.

20 years agoMade hard-link sending compatible with pre-28 protocols again.
Wayne Davison [Tue, 3 Feb 2004 04:21:15 +0000 (04:21 +0000)]
Made hard-link sending compatible with pre-28 protocols again.

20 years agoCorrected sizeof usage:
J.W. Schultz [Tue, 3 Feb 2004 03:42:49 +0000 (03:42 +0000)]
Corrected sizeof usage:
sizeof obj
sizeof (type)

20 years agoFix for memset bug found by buildfarm.
Wayne Davison [Mon, 2 Feb 2004 22:35:07 +0000 (22:35 +0000)]
Fix for memset bug found by buildfarm.

20 years agoChange to try to debug a failure on the build farm.
Wayne Davison [Mon, 2 Feb 2004 22:18:23 +0000 (22:18 +0000)]
Change to try to debug a failure on the build farm.

20 years agoDon't warn about lack of -l support if we're the sender -- we just won't
Wayne Davison [Mon, 2 Feb 2004 21:33:10 +0000 (21:33 +0000)]
Don't warn about lack of -l support if we're the sender -- we just won't
send the receiver any symlinks.

20 years ago- Call init_flist().
Wayne Davison [Mon, 2 Feb 2004 21:33:06 +0000 (21:33 +0000)]
- Call init_flist().
- Got rid of the symbolic-links-warning code (it was not right, and it is
  now handled in options.c).

20 years ago- Use as little memory as possible for the file_struct (saves another 3
Wayne Davison [Mon, 2 Feb 2004 21:33:03 +0000 (21:33 +0000)]
- Use as little memory as possible for the file_struct (saves another 3
  bytes per file).
- Made the idev struct allocated by the group-malloc again (J.W. suggested
  the proper way to align it for all systems).
- Added init_flist().

20 years agoAdded comment about the position of file_list's "flags" var.
Wayne Davison [Mon, 2 Feb 2004 21:32:56 +0000 (21:32 +0000)]
Added comment about the position of file_list's "flags" var.

20 years agoDon't free link_u.idev.
Wayne Davison [Mon, 2 Feb 2004 21:32:52 +0000 (21:32 +0000)]
Don't free link_u.idev.

20 years agoUse "%H:%M:%S" instead of "%T" in strftime() call since it looks to be
Wayne Davison [Mon, 2 Feb 2004 21:02:13 +0000 (21:02 +0000)]
Use "%H:%M:%S" instead of "%T" in strftime() call since it looks to be
more portable.

20 years agoClarify the safe/unsafe symlink options in the usage text.
Wayne Davison [Mon, 2 Feb 2004 18:25:37 +0000 (18:25 +0000)]
Clarify the safe/unsafe symlink options in the usage text.

20 years agoClarify the various safe/unsafe symlink options.
Wayne Davison [Mon, 2 Feb 2004 18:23:09 +0000 (18:23 +0000)]
Clarify the various safe/unsafe symlink options.

20 years agoGo back to using malloc() for the hard-link data structure (for now
Wayne Davison [Mon, 2 Feb 2004 07:06:54 +0000 (07:06 +0000)]
Go back to using malloc() for the hard-link data structure (for now
at least).

20 years agoFree the hlink data again.
Wayne Davison [Mon, 2 Feb 2004 07:06:50 +0000 (07:06 +0000)]
Free the hlink data again.

20 years agoMake sure that the idev struct's data is 4-byte aligned.
Wayne Davison [Mon, 2 Feb 2004 06:52:49 +0000 (06:52 +0000)]
Make sure that the idev struct's data is 4-byte aligned.

20 years ago- Changed the file-list allocation to alloc all the memory we need
Wayne Davison [Mon, 2 Feb 2004 05:06:36 +0000 (05:06 +0000)]
- Changed the file-list allocation to alloc all the memory we need
  with one call, not with several mallocs and strdups.
- Got rid of string_area() stuff (as suggested in the "@todo").
- Enhanced free_file() to optionally free the whole struct or to
  clear it (since we don't need to do both).
- Don't zero out the other flist data when we're about to free it.

20 years agoDon't free the hlink data (it is not separately allocated anymore).
Wayne Davison [Mon, 2 Feb 2004 05:06:35 +0000 (05:06 +0000)]
Don't free the hlink data (it is not separately allocated anymore).

20 years agoChanged args to make_file() and free_file().
Wayne Davison [Mon, 2 Feb 2004 05:06:34 +0000 (05:06 +0000)]
Changed args to make_file() and free_file().

20 years agoAdded CLEAR_STRUCT and FREE_STRUCT defines.
Wayne Davison [Mon, 2 Feb 2004 05:06:33 +0000 (05:06 +0000)]
Added CLEAR_STRUCT and FREE_STRUCT defines.

20 years agoAdded some missing #if SUPPORT_HARD_LINK and #if SUPPORT_LINK directives.
Wayne Davison [Sun, 1 Feb 2004 17:37:14 +0000 (17:37 +0000)]
Added some missing #if SUPPORT_HARD_LINK and #if SUPPORT_LINK directives.

20 years ago- Fixed the bug where the --daemon option would squelch all option errors
Wayne Davison [Sun, 1 Feb 2004 17:29:41 +0000 (17:29 +0000)]
- Fixed the bug where the --daemon option would squelch all option errors
  for later parameters.
- Complain if someone passes us -l and we don't support symlinks.

20 years agoChanged the rdev code to have both an "rdev" variable (which always
Wayne Davison [Sun, 1 Feb 2004 16:28:31 +0000 (16:28 +0000)]
Changed the rdev code to have both an "rdev" variable (which always
has the full device value) and an "rdev_high" variable (which zeros
the lower byte in the last rdev value).

20 years agoOne more improvement to the 0-flag-byte avoidance algorithm.
Wayne Davison [Sat, 31 Jan 2004 22:40:55 +0000 (22:40 +0000)]
One more improvement to the 0-flag-byte avoidance algorithm.

20 years agoA small optimization to the symlink-send code, and an extra sanity
Wayne Davison [Sat, 31 Jan 2004 21:01:01 +0000 (21:01 +0000)]
A small optimization to the symlink-send code, and an extra sanity
check to the symlink-receive code.

20 years agoFixed the test to ensure that we don't send a flag-byte of 0 to the
Wayne Davison [Sat, 31 Jan 2004 20:24:52 +0000 (20:24 +0000)]
Fixed the test to ensure that we don't send a flag-byte of 0 to the
receiver when transferring the file list.

20 years agoOne more minor variable-name change.
Wayne Davison [Sat, 31 Jan 2004 11:36:03 +0000 (11:36 +0000)]
One more minor variable-name change.

20 years agoSwitched a buffer name in make_file() to make the code a little more
Wayne Davison [Sat, 31 Jan 2004 11:32:30 +0000 (11:32 +0000)]
Switched a buffer name in make_file() to make the code a little more
similar to what is in receive_file_entry().

20 years agoFixed the optional sanitization of the files_from arg.
Wayne Davison [Fri, 30 Jan 2004 16:14:46 +0000 (16:14 +0000)]
Fixed the optional sanitization of the files_from arg.