1GROUP_MEMBER(3)            Linux Programmer's Manual           GROUP_MEMBER(3)
2
3
4

NAME

6       group_member - test whether a process is in a group
7

SYNOPSIS

9       #include <unistd.h>
10
11       int group_member(gid_t gid);
12
13   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
14
15       group_member(): _GNU_SOURCE
16

DESCRIPTION

18       The  group_member()  function tests whether any of the caller's supple‐
19       mentary group IDs (as returned by getgroups(2)) matches gid.
20

RETURN VALUE

22       The group_member() function returns nonzero if any of the caller's sup‐
23       plementary group IDs matches gid, and zero otherwise.
24

CONFORMING TO

26       This function is a nonstandard GNU extension.
27

SEE ALSO

29       getgid(2), getgroups(2), getgrouplist(3), group(5)
30

COLOPHON

32       This  page  is  part of release 5.02 of the Linux man-pages project.  A
33       description of the project, information about reporting bugs,  and  the
34       latest     version     of     this    page,    can    be    found    at
35       https://www.kernel.org/doc/man-pages/.
36
37
38
39GNU                               2014-03-30                   GROUP_MEMBER(3)
Impressum