You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Manvendra Bhangui edited this page Feb 25, 2024
·
4 revisions
NAME
grpscan - return array of groups to which the user belongs
SYNTAX
#include <setuserid.h>
gid_t *grpscan(char *user, int *ngroups);
DESCRIPTION
grpscan reads group(5) database for primary and supplementary groups to
which user belongs and returns an gid_t array of ngroups. The return
value and ngroups can be further used in a call to setgroups(2).
grpscan returns NULL on failure or gid_t array on success.