From bb40bc01bd15f85ef28e4325d592ff682189cb3d Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 28 Oct 2005 16:57:37 +0000 Subject: [PATCH] Add text to note that setresuid() always modifies the file system UID, and setresgid() likewise always modifies the file system GID. --- man2/setresuid.2 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/man2/setresuid.2 b/man2/setresuid.2 index 1023c376a..96b9750be 100644 --- a/man2/setresuid.2 +++ b/man2/setresuid.2 @@ -51,10 +51,15 @@ saved set-user-ID to arbitrary values. If one of the parameters equals \-1, the corresponding value is not changed. +Regardless of what changes are made to the real UID, effective UID, +and saved set-user-ID, the file system UID is always set to the same +value as the (possibly new) effective UID. + Completely analogously, .BR setresgid () sets the real GID, effective GID, and saved set-group-ID -of the current process, +of the current process (and always modifies the file system GID +to be the same as the effective GID), with the same restrictions for non-privileged processes. .SH "RETURN VALUE" @@ -85,6 +90,8 @@ provided _GNU_SOURCE is defined. .SH "SEE ALSO" .BR getresuid (2), .BR getuid (2), +.BR setfsuid (2), +.BR setfsgid (2), .BR setreuid (2), .BR setuid (2), .BR capabilities (7)