10 #include <sys/types.h>
15 int getgrouplist(const char *user, gid_t group,
16 gid_t *groups, int *ngroups);
26 * chids <uid> cmd... run command as uid, gid from passwd
27 * chids <uid:gid> cmd run command as uid, gid
28 * chids <uid:> cmd run command as uid, gid from passwd,groups
30 int main(int ac, char *av[]) {
42 if (uid == 0 && setgroups(0,0) == -1) {
47 if (setgid(pw->pw_gid) == -1) {
52 if (setuid(pw->pw_uid) == -1) {
59 /* shouldn't get here... */