Use password/group cache functions and avoid stashing a pointer to
authormillert <millert@openbsd.org>
Fri, 21 Sep 2018 19:13:49 +0000 (19:13 +0000)
committermillert <millert@openbsd.org>
Fri, 21 Sep 2018 19:13:49 +0000 (19:13 +0000)
commita6dbafc0031b54f4f30a265a9469f08aefec03fa
tree195d9332d42032cefe3622aa8dfc3d6650c17f92
parent78f0238b1164c3b9a0fe418e53d4baae114fe7f7
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/rdistd/server.c