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():
16           _GNU_SOURCE
17

DESCRIPTION

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

RETURN VALUE

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

CONFORMING TO

27       This function is a nonstandard GNU extension.
28

SEE ALSO

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

COLOPHON

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