Wayne Davison [Sat, 7 Jul 2007 16:01:59 +0000 (16:01 +0000)]
The length check in make_file() doesn't need to subtract pathname_len
anymore, as the sender code never concatenates the F_PATHNAME() value
with the dirname+basename string these days.
Wayne Davison [Mon, 2 Jul 2007 22:11:23 +0000 (22:11 +0000)]
Switch the checking of preserve_[ug]id var to checking [ug]id_ndx var
when the code is about to use the [ug]id_ndx value as an index (since
this saves a memory reference).
Wayne Davison [Mon, 2 Jul 2007 21:29:49 +0000 (21:29 +0000)]
Make option variables a little clearer by using separate FOO_ndx
values to index into the file-list extra-attribute array instead
of abusing the preserve_FOO variables.
Wayne Davison [Tue, 29 May 2007 04:19:47 +0000 (04:19 +0000)]
Unified the file-list pool used in incremental recursion mode so that
we use less memory, especially in small transfers. As file lists are
discarded, we use the new pool_boundary() and pool_free_old() functions
to discard pool extents that are no longer needed.
Wayne Davison [Tue, 29 May 2007 00:52:08 +0000 (00:52 +0000)]
- Fixed a bug where a pool_free() on the most-recently allocated pool
item was trying to make that memory available to the pool, but it
failed to adjust the right variable.
- Fixed a bug in pool_free() where the return of the entire live
extent back to unallocated status did not obey POOL_CLEAR.
- Use the new() and new_array() functions instead of malloc().
- Changed the sqew variable to skew.
- Some other minor formatting tweaks.
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().