Prevent the -g option from preserving groups that a non-root receiver
authorDavid Dykstra <dwd@samba.org>
Mon, 1 Mar 1999 19:24:39 +0000 (19:24 +0000)
committerDavid Dykstra <dwd@samba.org>
Mon, 1 Mar 1999 19:24:39 +0000 (19:24 +0000)
commit460f6b990a89a13060b57e1e52f72346bf020679
treec4b3d91d37566edbca65262c4c0ee1e13eb19143
parent896bd482c0c87d11e19f9bcffbcb35c6aba00e43
Prevent the -g option from preserving groups that a non-root receiver
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.
configure.in
rsync.c
rsync.yo
uidlist.c