mirror of https://github.com/mkerrisk/man-pages
setresuid.2: Add discussion of NPTL credential-changing mechanism
At the kernel level, credentials (UIDs and GIDs) are a per-thread attribute. NPTL uses a signal-based mechanism to ensure that when one thread changes its credentials, all other threads change credentials to the same values. By this means, the NPTL implementation conforms to the POSIX requirement that the threads in a process share credentials. Reported-by: Shawn Landden <shawn@churchofgit.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
716db1bafe
commit
ab09119b65
|
@ -1,4 +1,5 @@
|
|||
.\" Copyright (C) 1997 Andries Brouwer (aeb@cwi.nl)
|
||||
.\" and Copyright (C) 2005, 2010, 2014, 2015, Michael Kerrisk <mtk.manpages@gmail.com>
|
||||
.\"
|
||||
.\" %%%LICENSE_START(VERBATIM)
|
||||
.\" Permission is granted to make and distribute verbatim copies of this
|
||||
|
@ -129,6 +130,23 @@ The glibc
|
|||
and
|
||||
.BR setresgid ()
|
||||
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 setresuid ()
|
||||
and
|
||||
.BR setresgid ())
|
||||
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 getresuid (2),
|
||||
.BR getuid (2),
|
||||
|
|
Loading…
Reference in New Issue