mount_setattr.2: Reword the description of the 'propagation field'
[man-pages.git] / man3 / group_member.3
blobab39595ce28459f06f933ca63f1af56f6ba9afa8
1 .\" Copyright (C) 2014, Michael Kerrisk <mtk.manpages@gmail.com>
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .TH GROUP_MEMBER 3 2021-03-22 "GNU" "Linux Programmer's Manual"
26 .SH NAME
27 group_member \- test whether a process is in a group
28 .SH SYNOPSIS
29 .nf
30 .B #include <unistd.h>
31 .PP
32 .BI "int group_member(gid_t " gid );
33 .fi
34 .PP
35 .RS -4
36 Feature Test Macro Requirements for glibc (see
37 .BR feature_test_macros (7)):
38 .RE
39 .PP
40 .BR group_member ():
41 .nf
42     _GNU_SOURCE
43 .fi
44 .SH DESCRIPTION
45 The
46 .BR group_member ()
47 function tests whether any of the caller's supplementary group IDs
48 (as returned by
49 .BR getgroups (2))
50 matches
51 .IR gid .
52 .SH RETURN VALUE
53 The
54 .BR group_member ()
55 function returns nonzero if any of the caller's
56 supplementary group IDs matches
57 .IR gid ,
58 and zero otherwise.
59 .SH CONFORMING TO
60 This function is a nonstandard GNU extension.
61 .SH SEE ALSO
62 .BR getgid (2),
63 .BR getgroups (2),
64 .BR getgrouplist (3),
65 .BR group (5)