]>
Commit | Line | Data |
---|---|---|
701f91bd MK |
1 | .\" Copyright (C) 2014, Michael Kerrisk <mtk.manpages@gmail.com> |
2 | .\" | |
5fbde956 | 3 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
701f91bd | 4 | .\" |
4c1c5274 | 5 | .TH group_member 3 (date) "Linux man-pages (unreleased)" |
701f91bd MK |
6 | .SH NAME |
7 | group_member \- test whether a process is in a group | |
4508f8a0 AC |
8 | .SH LIBRARY |
9 | Standard C library | |
8fc3b2cf | 10 | .RI ( libc ", " \-lc ) |
701f91bd | 11 | .SH SYNOPSIS |
c7db92b9 | 12 | .nf |
701f91bd | 13 | .B #include <unistd.h> |
c6d039a3 | 14 | .P |
701f91bd | 15 | .BI "int group_member(gid_t " gid ); |
c7db92b9 | 16 | .fi |
c6d039a3 | 17 | .P |
d39ad78f | 18 | .RS -4 |
701f91bd MK |
19 | Feature Test Macro Requirements for glibc (see |
20 | .BR feature_test_macros (7)): | |
d39ad78f | 21 | .RE |
c6d039a3 | 22 | .P |
701f91bd | 23 | .BR group_member (): |
1dd0d7b4 MK |
24 | .nf |
25 | _GNU_SOURCE | |
26 | .fi | |
701f91bd MK |
27 | .SH DESCRIPTION |
28 | The | |
29 | .BR group_member () | |
30 | function tests whether any of the caller's supplementary group IDs | |
31 | (as returned by | |
32 | .BR getgroups (2)) | |
33 | matches | |
34 | .IR gid . | |
35 | .SH RETURN VALUE | |
36 | The | |
37 | .BR group_member () | |
38 | function returns nonzero if any of the caller's | |
39 | supplementary group IDs matches | |
40 | .IR gid , | |
41 | and zero otherwise. | |
3113c7f3 | 42 | .SH STANDARDS |
4131356c | 43 | GNU. |
701f91bd MK |
44 | .SH SEE ALSO |
45 | .BR getgid (2), | |
46 | .BR getgroups (2), | |
47 | .BR getgrouplist (3), | |
48 | .BR group (5) |