.\" Modified 1993-07-24 by Rik Faith <faith@cs.unc.edu>
.\" Modified 2004-10-10 by aeb
.\"
-.TH INITGROUPS 3 2007-07-26 "GNU" "Linux Programmer's Manual"
+.TH INITGROUPS 3 2017-09-15 "GNU" "Linux Programmer's Manual"
.SH NAME
initgroups \- initialize the supplementary group access list
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <grp.h>
-.sp
+.PP
.BI "int initgroups(const char *" user ", gid_t " group );
.fi
-.sp
+.PP
.in -4n
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.in
-.sp
+.PP
.BR initgroups ():
-_BSD_SOURCE
+ Since glibc 2.19:
+ _DEFAULT_SOURCE
+ Glibc 2.19 and earlier:
+ _BSD_SOURCE
.SH DESCRIPTION
The
.BR initgroups ()
function initializes the group access list by
-reading the group database \fI/etc/group\fP and using all groups of
-which \fIuser\fP is a member.
-The additional group \fIgroup\fP is
+reading the group database
+.I /etc/group
+and using all groups of
+which
+.I user
+is a member.
+The additional group
+.I group
+is
also added to the list.
-
+.PP
The
.I user
argument must be non-NULL.
See the underlying system call
.BR setgroups (2).
.SH FILES
-.nf
-\fI/etc/group\fP group database file
-.fi
+.TP
+.I /etc/group
+group database file
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR initgroups ()
+T} Thread safety MT-Safe locale
+.TE
+.sp 1
.SH CONFORMING TO
SVr4, 4.3BSD.
.SH SEE ALSO