OSDN Git Service

406b51e08245a537073624b2516500ca983e67ae
[linuxjm/LDP_man-pages.git] / original / man3 / group_member.3
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>
30 .sp
31 .BI "int group_member(gid_t " gid );
32 .sp
33 .in -4n
34 Feature Test Macro Requirements for glibc (see
35 .BR feature_test_macros (7)):
36 .in
37 .sp
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)
62 .SH COLOPHON
63 This page is part of release 3.78 of the Linux
64 .I man-pages
65 project.
66 A description of the project,
67 information about reporting bugs,
68 and the latest version of this page,
69 can be found at
70 \%http://www.kernel.org/doc/man\-pages/.