getgrouplist
while (getgrouplist(user, base, groups_bygid, &ngroups) == -1) {
int getgrouplist(const char *, gid_t, gid_t *, int *);
getgrouplist(uname, agroup, groups, &ngroups);
int getgrouplist(const char *, gid_t, gid_t *, int *);
if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups))
getgrouplist(pw->pw_name, gid, groups, &ngroups);
getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
if (getgrouplist(username, pwd->pw_gid, groups, &ngroups) != 0) \