- 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.
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.
- 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).
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.
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).
does not belong to, in these two ways:
1. If a group mapping doesn't exist for a group name, do not preserve
it for a non-root receiver. This is especially evident with the
sender is a daemon using chroot because then no mappings are
available.
2. Before setting the group on a file make sure that it is in the list
of groups returned by getgroups(). The same thing is done by chgrp
on systems that support bsd-style chown/chgrp, and this enforces
that it happens the same way on all systems. Overhead is very
little, especially since most systems don't allow more then 16
groups per user.
in 3 ways:
1) the realloc is done on a list of pointers, not a list of structures
2) only the basename of the file is now kept in the file struct an a
util function f_name() is now used to access the full name when
required.
3) pointers to directory names are re-used
hopefully I haven't broken anything. This will need lots of testing.