diff --git a/man2/setreuid.2 b/man2/setreuid.2 index 94ca82aaf..de6d49267 100644 --- a/man2/setreuid.2 +++ b/man2/setreuid.2 @@ -1,4 +1,5 @@ .\" Copyright (c) 1983, 1991 The Regents of the University of California. +.\" and Copyright (C) 2009, 2010, 2014, 2015, Michael Kerrisk .\" All rights reserved. .\" .\" %%%LICENSE_START(BSD_4_CLAUSE_UCB) @@ -191,6 +192,23 @@ The glibc and .BR setregid () wrapper functions transparently deal with the variations across kernel versions. +.\" +.SS C library/kernel ABI 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 those for +.BR setreuid () +and +.BR setregid ()) +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 getuid (2),