Commit Graph

4984 Commits

Author SHA1 Message Date
Wayne Davison
898fab2577 Got rid of superfluous acl_clear_perms() call that Antti Tapaninen
pointed out.
2007-05-25 14:16:57 +00:00
Wayne Davison
0e5dd89866 Mention latest improvements. 2007-05-24 23:11:33 +00:00
Wayne Davison
79028af116 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.
2007-05-24 23:08:39 +00:00
Wayne Davison
a572e12675 - 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().
2007-05-24 02:50:41 +00:00
Wayne Davison
c8e8394615 If someone forces the use of qsort() via --qsort, disable incremental
recursion (at least for now).
2007-05-24 02:50:38 +00:00
Wayne Davison
8487f9cf29 - Added the --qsort option.
- Added several new --no-FOO options.
2007-05-24 02:50:35 +00:00
Wayne Davison
d750be6ad8 Make sure we don't try to output a NULL pointer in a verbose message. 2007-05-23 00:48:27 +00:00
Wayne Davison
0bb8616535 - 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).
2007-05-23 00:42:38 +00:00
Wayne Davison
1faa1a6da9 Output a -vvv(erbose) message when receiving an incremental file list. 2007-05-23 00:42:32 +00:00
Wayne Davison
b5ae4e25c2 Added a comment to the do_chmod() to mark it as a discouraged function. 2007-05-22 05:59:02 +00:00
Wayne Davison
3d0a159d96 Added a comment to a shared iterator to avoid a warning from IBM's checker. 2007-05-22 05:58:59 +00:00
Wayne Davison
8ea07c0030 - 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.
2007-05-22 05:50:47 +00:00
Wayne Davison
59fd2a5e7d Improved the error message when a dir-number is out of bounds. 2007-05-22 05:50:41 +00:00
Wayne Davison
ae87c43452 One more output_flist() call that should verify if my analysis
of the Solaris 10 host's merge-test failure is correct or not.
2007-05-22 03:58:18 +00:00
Wayne Davison
f1599b9ef2 Be more verbose so that we can debug what is going wrong on solaris. 2007-05-22 00:00:51 +00:00
Wayne Davison
ee83e1bd4d Improved the index values that output_flist() outputs when we're being
extra verbose:  they now have the list's ndx_start value added in.
2007-05-22 00:00:07 +00:00
Wayne Davison
7455467c17 One more try at silencing some checker warnings. 2007-05-21 23:45:26 +00:00
Wayne Davison
19395697b9 Let's see if we can silence some more code-checker warnings. 2007-05-21 18:39:05 +00:00
Wayne Davison
7787579ad4 Added some "FALL THROUGH" comments in the main switch. 2007-05-21 10:20:18 +00:00
Wayne Davison
58a37ed34a Get rid of compiler warning about iconv()'s second parameter. 2007-05-21 03:56:06 +00:00
Wayne Davison
fe8d61e5d5 Fixed a thinko in the calling of recv_add_gid(). 2007-05-21 03:20:39 +00:00
Wayne Davison
87b0cc726b Got rid of the temporary "set -x" that was added for debugging. 2007-05-21 03:09:25 +00:00
Wayne Davison
4504b2259f The match_gid() function needed to affect the *flags_ptr value
when re-using the last-found match.
2007-05-21 03:08:55 +00:00
Wayne Davison
cf1b4969b9 The recv_file_entry() function needed to remember the gid flags so that
it can reuse them when the gid stays the same.
2007-05-21 03:08:01 +00:00
Wayne Davison
434e77193c Set -x option to diagnose what is going wrong on FreeBSD. 2007-05-21 02:31:20 +00:00
Wayne Davison
858d45f160 Cast some F_OWNER()/F_GROUP() values to make sure that we don't get
a signed/unsigned compiler warning on some systems.
2007-05-21 02:17:48 +00:00
Wayne Davison
63186ec077 Fixed a problem in a couple OS's sys_acl_get_access_bits() functions. 2007-05-21 02:09:45 +00:00
Wayne Davison
dfcb386569 Make sure that the scratch dirs have rwx permissions before we try
a recursive rm.
2007-05-21 02:06:51 +00:00
Wayne Davison
d15f2ff0cf Tweaked a sentence in the --size-only section. 2007-05-21 01:06:16 +00:00
Wayne Davison
c395acd804 Create a symlink back to the source dir in the scratchdir of a test. 2007-05-21 01:05:36 +00:00
Wayne Davison
030820d5dc - 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.)
2007-05-21 01:04:40 +00:00
Wayne Davison
043ef55b22 - 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.
2007-05-21 01:04:37 +00:00
Wayne Davison
a30dcbc0a8 - 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).
2007-05-21 01:04:34 +00:00
Wayne Davison
02f0227e87 Changed SUBPROTOCOL_VERSION from 2 to 3 because of the ACL protocol changes. 2007-05-21 01:04:31 +00:00
Wayne Davison
142a5e7b8b Moved GID_NONE define from rsync.h to uidlist.c. 2007-05-20 07:40:07 +00:00
Wayne Davison
fdfc67406c - Added more users and some groups to one of the files we're copying. 2007-05-20 07:10:48 +00:00
Wayne Davison
fb7b9ddcb1 - Use F_OWNER() and F_GROUP() instead of F_UID() and F_GID(). 2007-05-20 07:10:45 +00:00
Wayne Davison
4ade505c7e - Use F_OWNER() and F_GROUP() instead of F_UID() and F_GID().
- Use the new FLAG_SKIP_GROUP define.
2007-05-20 07:10:41 +00:00
Wayne Davison
1564cd5a87 - 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().
2007-05-20 07:10:37 +00:00
Wayne Davison
33233b4900 - 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.
2007-05-20 07:10:34 +00:00
Wayne Davison
d6b422a61c - 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.
2007-05-20 07:10:31 +00:00
Wayne Davison
ff2001b91b - Added FLAG_SKIP_GROUP define.
- Removed F_UID() and F_GID() defines.
2007-05-20 07:10:28 +00:00
Wayne Davison
d858b27400 A couple more minor tweaks. 2007-05-08 17:04:05 +00:00
Wayne Davison
1874f7e2e1 Improved the documentation on the "quick check" algorithm and the
--size-only option.
2007-05-08 17:01:24 +00:00
Wayne Davison
377d22ab9f 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.
2007-05-06 19:44:26 +00:00
Wayne Davison
4f3797c7e2 Clumped some option-sending together that only happens on the sending side. 2007-05-05 18:34:37 +00:00
Wayne Davison
6b5a8f80fc Try a better way to deduce if the xattr functions we need are there. 2007-04-30 02:58:14 +00:00
Wayne Davison
bf10faa9dc Added a "sleep 1" to make certain failures more reproducible. 2007-04-29 15:01:57 +00:00
Wayne Davison
548ca46fec Use the --super option for the non-fake test, just in case a system
can chown without appearing to be root (uid 0).
2007-04-28 23:47:16 +00:00
Wayne Davison
e8c64ffdc7 If the lgetxattr() function isn't found, disable xattr support. 2007-04-28 18:40:23 +00:00