Commit Graph

62 Commits

Author SHA1 Message Date
Wayne Davison
c2dd3ec32c Avoid a compiler warnings about a signed/unsigned mismatch. 2009-12-13 17:52:05 -08:00
Wayne Davison
d720569422 Moved a few group-related functions with some minor tweaks; 2009-10-20 07:54:21 -07:00
Wayne Davison
3b83a22057 Define and use "our_gid" variable. 2009-09-02 08:56:34 -07:00
Wayne Davison
56017d3150 Enhance name_to_{u,g}id() to optionally parse numbers and rename
to {user,group}_to_*().  Based on a patch by Matt McCutchen.
2009-05-07 07:34:42 -07:00
Matt McCutchen
46d68be3da Fixed recv_add_uid() to properly differentiate users and groups. 2009-01-13 11:21:06 -08:00
Wayne Davison
b3bf9b9df9 Update the copyright year. 2009-01-03 10:57:14 -08:00
Wayne Davison
2df20057e3 Adding the --usermap/--groupmap/--chown options. 2008-11-15 18:13:00 -08:00
Wayne Davison
951e826b75 Added the --info=FLAGS an --debug=FLAGS options, which allows
fine-grained output control (in addition to the coarse -v).
2008-07-13 20:51:08 -07:00
Wayne Davison
d3d07a5e86 Include 2008 in the copyright years. 2008-03-01 12:01:41 -08:00
Wayne Davison
7b4f48650c Make a few more char pointers const. 2008-02-19 16:35:22 -08:00
Wayne Davison
0b52f94da7 Some daemon security improvements, including the new parameters
"charset" and "numeric ids".
2008-02-15 17:39:21 -08:00
Wayne Davison
c78cb8f349 Made some user-/group-name pointers "const". 2007-12-29 22:52:42 -08:00
Wayne Davison
8e41b68e8f Tweaking the license text a bit more. 2007-07-10 13:55:49 +00:00
Wayne Davison
9decb4d2ef Changed "count" to "used" in struct file_list since there can
be empty items that make the count inaccurate (and the name
somewhat deceiving).
2007-07-07 20:22:05 +00:00
Wayne Davison
4fd842f98d Switching to GPL 3. 2007-07-07 05:33:14 +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
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
142a5e7b8b Moved GID_NONE define from rsync.h to uidlist.c. 2007-05-20 07:40:07 +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
f31514adb7 Changed the *_abbbrevint() functions to *_varint(). 2007-04-20 02:17:58 +00:00
Wayne Davison
a217c45359 Got rid of ACL's uid/gid iterators in favor of a single function
that converts the uids & gids in a loop.
2007-04-18 02:33:02 +00:00
Wayne Davison
ab14d01a0e Use the abbrevint30 routines in a few more places. 2007-03-11 05:59:46 +00:00
Wayne Davison
1c3344a105 The ACL support has arrived! This version has a brand new protocol
that makes it incompatible with all prior versions.  A patch will be
provided to allow talking with older (patched) rsync versions.
2007-03-11 00:13:34 +00:00
Wayne Davison
ba2133d6ad Further modifications to the copyright comment section. 2007-02-04 14:54:58 +00:00
Wayne Davison
f1482c3391 Assign the owner and group using F_OWNER() and F_GROUP(). 2006-12-28 09:42:48 +00:00
Wayne Davison
496c809f8c - Made match_uid(), match_gid(), recv_user_name(), and recv_group_name()
public functions.
- Made add_uid() and add_gid() return the name or NULL.
2006-12-28 07:54:37 +00:00
Wayne Davison
283887d777 Neaten up use of uid_t/gid_t variable types. 2006-12-28 07:08:13 +00:00
Wayne Davison
82ad07c418 - Typical tranfers now save 12-20 bytes per file because several vars
were moved out of file_struct into an optional member-var setup.
- Renamed and reorganized the FLAG_* defines.
- Use NDX_DONE instead of a literal -1 when sending/checking the
  end-of-phase index value.
2006-12-03 06:44:16 +00:00
Wayne Davison
10944395bf Changed sprintf() calls to snprintf() calls. 2006-10-13 23:35:53 +00:00
Wayne Davison
e7c67065c0 Updated the FSF's address to an even newer one. 2006-04-25 23:51:12 +00:00
Wayne Davison
0f78b81511 - Updated the address for the FSF in the opening comment.
- Standardized the format of the opening comment, including adding a
  brief description of what's in the file for those that lacked it.
- Added some missing copyright lines.
- Some minor whitespace tweaks (in a few of the files).
2006-04-25 20:23:34 +00:00
Wayne Davison
7b6fa00ff8 Decided to hold off on the potential memory savings of indexed
uid/gid pairs until the next release.
2006-01-25 17:10:29 +00:00
Wayne Davison
90cf838b18 Dump some debug code. 2006-01-24 21:39:10 +00:00
Wayne Davison
67e4043e8c Optimized id_pair() so that clumps of IDs get handled more
efficiently.
2006-01-24 19:39:09 +00:00
Wayne Davison
5e58e3f9cf The uid & gid are now stored using an id_pair structure. 2006-01-24 19:02:55 +00:00
Wayne Davison
86fc7e6880 Got rid of a superfluous newline. 2005-11-10 16:47:52 +00:00
Wayne Davison
4f5b0756df John E. Malmberg convinced me to standardize on #ifs for defined
values instead of non-zero.
2005-02-14 00:53:43 +00:00
Wayne Davison
25ff04417e Use "#if" (not "#ifdef") for configure-defined macros. 2005-01-28 18:50:49 +00:00
Wayne Davison
b66d00853b Fixed the use of an uninitialized variable in map_uid() and map_gid(). 2004-04-28 17:31:31 +00:00
Wayne Davison
f567e9b3d7 - Guard against and out-of-memory condition.
- Don't use the NGROUPS_MAX define.
2004-02-20 17:09:30 +00:00
Wayne Davison
01363a24e2 Fixed a problem handling GID_NONE in match_gid(). 2004-02-05 01:32:38 +00:00
Wayne Davison
d49def4832 - 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.
2004-02-05 01:07:23 +00:00
Wayne Davison
ade7292aee Moved a function. 2004-02-04 20:09:21 +00:00
Wayne Davison
dbd8811b85 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).
2004-02-04 19:25:11 +00:00
Wayne Davison
1df395f7c2 Use the new HAVE_GETGROUPS define. 2004-02-04 17:49:36 +00:00
Wayne Davison
670d8abf80 Use MY_GID() instead of getgid(). 2004-02-04 17:05:44 +00:00
Wayne Davison
187e9c24f1 Another improvement to the debug info we output. 2004-02-04 16:27:47 +00:00
Wayne Davison
555b0e20f7 Tweaked the new debug-logging strings. 2004-02-04 07:24:13 +00:00
Wayne Davison
84fa865c0c Output some debug info if verbose > 3. 2004-02-04 03:50:16 +00:00
Wayne Davison
a2687b64a2 Added a little more compatibility code for non-standard systems. 2004-02-03 23:28:19 +00:00