Use password/group cache functions and avoid stashing a pointer to
authormillert <millert@openbsd.org>
Fri, 21 Sep 2018 19:00:45 +0000 (19:00 +0000)
committermillert <millert@openbsd.org>
Fri, 21 Sep 2018 19:00:45 +0000 (19:00 +0000)
commit78f0238b1164c3b9a0fe418e53d4baae114fe7f7
tree26f29b1e80a464241a3e4f601c98ec76d6b94305
parenteff86d54bd4fcf78aefb8c17f595ccd12d3dd98d
Use password/group cache functions and avoid stashing a pointer to
the return value of getgrgid(3) or getgrnam(3) which relies on
undefined behavior.  The rdist server will now use getgroups(2) to
determine group membership of the invoking user.  In addition, there
is now one implementation of tilde expansion instead of two.
OK tb@ tim@
usr.bin/rdist/common.c
usr.bin/rdist/defs.h
usr.bin/rdist/expand.c