Wayne Davison [Thu, 24 May 2007 23:08:39 +0000 (23:08 +0000)]
Changed dup-detection code to keep the first item in the user's args.
This is more in keeping with the way cp works, and also makes the dir-
joining code (in inc_recurse mode) easier.
Wayne Davison [Thu, 24 May 2007 02:50:41 +0000 (02:50 +0000)]
- Added fsort() and fsort_tmp() that implement a mergesort routine
that ensures that any identical items in the file-list stay in the
same order as they had in the input. It will also obey the --qsort
option (which causes it to punt the sort to the qsort() routine).
- Changed the various places that sort the file-list to call fsort().
Wayne Davison [Wed, 23 May 2007 00:42:38 +0000 (00:42 +0000)]
- Output a -vvv(erbose) message in the touch_up_dirs() loop.
- Made the keep-alive counter in touch_up_dirs() work better.
- Use !(N & 0xFF) instead of !(N % 200).
Wayne Davison [Tue, 22 May 2007 05:50:47 +0000 (05:50 +0000)]
- Changed the dir_flist code on the sending side to derive its sorted
data from the sorted parent flist. This ensures that any entries
marked with FLAG_DUPLICATE are in the same order in the dir_flist
(where the flags get checked) as they are in the parent flist
(where the flags get set).
- Made the flist_expand() function static.
- Added a growth count arg to flist_expand().
- Made make_file() set a pool variable instead of tweaking flist.
- Improved the error message when a dir-number is out of bounds.
Wayne Davison [Mon, 21 May 2007 01:04:40 +0000 (01:04 +0000)]
- Unified the formerly separate user & group name-lists into a single
name-list. On POSIX systems, this list will be sorted with the user
names first, so the code will work essentially the same way it did
before for the currently supported OSes. However, the code will now
more easily support non-POSIX ACL setups such as (hopefully) the one
used in OS X.
- Increased the (potentially) available access-bit storage for name
elements from 3 to 31 bits. For non-name elements, the access bits
now have the potential to store 7 bits instead of 3. (All the
current POSIX implementations still error-check their values at 3
bits, but this will allow adding non-POSIX ACL setups more easily.)
- The protocol that transmits the ACL information was changed to send
names in a single list, and to use {read,write}_varint() functions
instead of {read,write}_byte(). This supports sending access-bit
values up to 32-bits (minus any bits reserved for xmit flags).
- The construction of the internal access-bit value was moved into the
lib/sysacls.c code, so that it could be handled in an appropriate
manner for each OS.
(Aside: the code still does not support transmitting incompatible ACL
information between systems, but I envision improving --fake-super to
store the ACL information that is received as xattr information, and
this would allow a system that supports extended attributes to backup
a source system that had an incompatible ACL method.)
Wayne Davison [Mon, 21 May 2007 01:04:37 +0000 (01:04 +0000)]
- Define what the valid access bits are for a name element and a
non-name element.
- Set a define when the OS needs the name-list sorted.
- Got rid of the permset-related defines.
- Got rid of some function prototypes that rsync doesn't need.
- Got rid of the defines for the do-nothing ACL code.
Wayne Davison [Mon, 21 May 2007 01:04:34 +0000 (01:04 +0000)]
- Added a function to get/set all the access-bit values with a single
call. This allows the per-OS compatibility code to construct the
value with however many bits are supported by each OS.
- Removed several functions that rsync doesn't (and won't) need.
- Got rid of the do-nothing ACL code (the ACL code in rsync should be
disabled on a system that we can't support).
Wayne Davison [Sun, 20 May 2007 07:10:37 +0000 (07:10 +0000)]
- Use F_OWNER() and F_GROUP() instead of F_UID() and F_GID().
- Made recv_file_entry() name the xmit-flags variable "xflags" to
prevent confusion with the internal flags value we're creating.
- Added an arg to the calls of recv_group_name() and match_gid().
- Use the improved function names: send_id_list() and recv_id_list().
- Improved the display of the GID values in output_flist().
Wayne Davison [Sun, 20 May 2007 07:10:34 +0000 (07:10 +0000)]
- Fixed a bug in the match_racl_ids() function's iteration.
- Fixed a bug with preserving a group ID in an ACL when running as
a non-super user that the user is not a member of.
Wayne Davison [Sun, 20 May 2007 07:10:31 +0000 (07:10 +0000)]
- Changed id & id2 from int to id_t in the struct iflist.
- Added a uint16 flags var to struct iflist.
- We now mark a group with FLAG_SKIP_GROUP if the receiving user
can't set a group rather than turning it into GID_NONE. This
allows us to keep the real group ID mapping, which is needed by
the ACL code.
Wayne Davison [Sun, 6 May 2007 19:44:26 +0000 (19:44 +0000)]
If the server is exiting with an error, delay our exit just a little
in order to give the client side a better chance of reading any error
message we just sent.
Wayne Davison [Thu, 26 Apr 2007 23:15:47 +0000 (23:15 +0000)]
- Fixed the merging of duplicated directory hierarchies in incremental
recursion mode.
- Fixed some problems with --iconv in incremental recursion mode.
Wayne Davison [Thu, 26 Apr 2007 23:06:38 +0000 (23:06 +0000)]
Prevent a hang in incremental-recursion mode when the receiver encounters
an error updating the file: the receiver now sends MSG_NO_SEND to the
generator so that it knows when all outstanding work is completed.
Wayne Davison [Thu, 26 Apr 2007 00:23:48 +0000 (00:23 +0000)]
- Renamed flist_dir to pathname to avoid confusion with dir_flist var.
- Renamed push_flist_dir() to push_pathname().
- Set a pool var in recv_file_ent() instead of playing games with flist.
- Simplified the top_flags computation in send_file_list().
Wayne Davison [Tue, 24 Apr 2007 17:06:09 +0000 (17:06 +0000)]
Made the devices.test script do a real device test when called
normally, or a fake-device test when called with "fake" in the
script name. Added a devices-fake.test symlink.
Wayne Davison [Sat, 21 Apr 2007 18:40:42 +0000 (18:40 +0000)]
Added a way to exchange a protocol's sub-protocol value. This will be
0 when a protocol goes final, and non-zero for an intermediary CVS
version of a protocol that is in flux. If we find that we're talking
to a CVS version with a different sub-protocol #, we automatically
drop back to the prior protocol that the sides have in common.
Wayne Davison [Fri, 20 Apr 2007 08:17:03 +0000 (08:17 +0000)]
- Call the new {read,write}_varlong30() names for the long-int
functions that are protocol sensitive.
- Changed the sending of the time value in protocol 30 to support
64-bit values without bloating positive 32-bit values.