aboutsummaryrefslogtreecommitdiffstats
path: root/man2/getgroups.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/getgroups.2')
-rw-r--r--man2/getgroups.266
1 files changed, 37 insertions, 29 deletions
diff --git a/man2/getgroups.2 b/man2/getgroups.2
index 36300bf61b..83a1508efb 100644
--- a/man2/getgroups.2
+++ b/man2/getgroups.2
@@ -138,15 +138,48 @@ See the description of
.IR /proc/ pid /setgroups
in
.BR user_namespaces (7).
+.SH VERSIONS
+.SS C library/kernel differences
+At the kernel level, user IDs and group IDs are a per-thread attribute.
+However, POSIX requires that all threads in a process
+share the same credentials.
+The NPTL threading implementation handles the POSIX requirements by
+providing wrapper functions for
+the various system calls that change process UIDs and GIDs.
+These wrapper functions (including the one for
+.BR setgroups ())
+employ a signal-based technique to ensure
+that when one thread changes credentials,
+all of the other threads in the process also change their credentials.
+For details, see
+.BR nptl (7).
.SH STANDARDS
-.BR getgroups ():
-SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR setgroups ():
+.TP
+.BR getgroups ()
+POSIX.1-2008.
+.TP
+.BR setgroups ()
+None.
+.SH HISTORY
+.TP
+.BR getgroups ()
+SVr4, 4.3BSD, POSIX.1-2001.
+.TP
+.BR setgroups ()
SVr4, 4.3BSD.
Since
.BR setgroups ()
requires privilege, it is not covered by POSIX.1.
+.PP
+The original Linux
+.BR getgroups ()
+system call supported only 16-bit group IDs.
+Subsequently, Linux 2.4 added
+.BR getgroups32 (),
+supporting 32-bit IDs.
+The glibc
+.BR getgroups ()
+wrapper function transparently deals with the variation across kernel versions.
.SH NOTES
A process can have up to
.B NGROUPS_MAX
@@ -176,31 +209,6 @@ cannot be larger than one more than this value.
Since Linux 2.6.4, the maximum number of supplementary group IDs is also
exposed via the Linux-specific read-only file,
.IR /proc/sys/kernel/ngroups_max .
-.PP
-The original Linux
-.BR getgroups ()
-system call supported only 16-bit group IDs.
-Subsequently, Linux 2.4 added
-.BR getgroups32 (),
-supporting 32-bit IDs.
-The glibc
-.BR getgroups ()
-wrapper function transparently deals with the variation across kernel versions.
-.\"
-.SS C library/kernel differences
-At the kernel level, user IDs and group IDs are a per-thread attribute.
-However, POSIX requires that all threads in a process
-share the same credentials.
-The NPTL threading implementation handles the POSIX requirements by
-providing wrapper functions for
-the various system calls that change process UIDs and GIDs.
-These wrapper functions (including the one for
-.BR setgroups ())
-employ a signal-based technique to ensure
-that when one thread changes credentials,
-all of the other threads in the process also change their credentials.
-For details, see
-.BR nptl (7).
.SH SEE ALSO
.BR getgid (2),
.BR setgid (2),