]>
Commit | Line | Data |
---|---|---|
701f91bd MK |
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 2014-03-30 "GNU" "Linux Programmer's Manual" | |
26 | .SH NAME | |
27 | group_member \- test whether a process is in a group | |
28 | .SH SYNOPSIS | |
29 | .B #include <unistd.h> | |
68e4db0a | 30 | .PP |
701f91bd | 31 | .BI "int group_member(gid_t " gid ); |
68e4db0a | 32 | .PP |
701f91bd MK |
33 | .in -4n |
34 | Feature Test Macro Requirements for glibc (see | |
35 | .BR feature_test_macros (7)): | |
36 | .in | |
68e4db0a | 37 | .PP |
701f91bd MK |
38 | .BR group_member (): |
39 | _GNU_SOURCE | |
40 | .SH DESCRIPTION | |
41 | The | |
42 | .BR group_member () | |
43 | function tests whether any of the caller's supplementary group IDs | |
44 | (as returned by | |
45 | .BR getgroups (2)) | |
46 | matches | |
47 | .IR gid . | |
48 | .SH RETURN VALUE | |
49 | The | |
50 | .BR group_member () | |
51 | function returns nonzero if any of the caller's | |
52 | supplementary group IDs matches | |
53 | .IR gid , | |
54 | and zero otherwise. | |
55 | .SH CONFORMING TO | |
56 | This function is a nonstandard GNU extension. | |
57 | .SH SEE ALSO | |
58 | .BR getgid (2), | |
59 | .BR getgroups (2), | |
60 | .BR getgrouplist (3), | |
61 | .BR group (5) |