seteuid.2: Note glibc version where setegid() implementation changed

In glibc 2.2/2.3, setegid() switched from setregid() to setresgid().
This commit is contained in:
Michael Kerrisk 2012-07-02 09:52:41 +02:00
parent 49b759abb0
commit f658081708
1 changed files with 8 additions and 3 deletions

View File

@ -24,7 +24,7 @@
.\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added notes on capability requirements
.\"
.TH SETEUID 2 2009-10-17 "Linux" "Linux Programmer's Manual"
.TH SETEUID 2 2012-07-02 "Linux" "Linux Programmer's Manual"
.SH NAME
seteuid, setegid \- set effective user or group ID
.SH SYNOPSIS
@ -103,8 +103,13 @@ and hence may change the saved set-user-ID.
Under glibc 2.1 and later it is equivalent to
.BI setresuid(\-1, " euid" ", \-1)"
and hence does not change the saved set-user-ID.
Similar remarks hold for
.BR setegid ().
Analogous remarks hold for
.BR setegid (),
with the difference that the change in implementation from
.BI setregid(\-1, " egid" )
to
.BI setresgid(\-1, " egid" ", \-1)"
occurred in glibc 2.2 or 2.3 (dependeing on the hardware architecture).
According to POSIX.1,
.BR seteuid ()