]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man3/initgroups.3
proc.5: Note kernel version for /proc/PID/smaps VmFlags "dd" flag
[thirdparty/man-pages.git] / man3 / initgroups.3
index f2d0b318391bfc39eef0236a659dfeb31230638c..f49e2c931f8c87a96a4da7fd9b50b966e4c88241 100644 (file)
 .\" 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.
@@ -76,9 +85,22 @@ The calling process has insufficient privilege.
 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