.BR setresuid ()
sets the real user ID, the effective user ID, and the
saved set-user-ID of the calling process.
-
+.PP
An unprivileged process may change its real UID,
effective UID, and saved set-user-ID, each to one of:
the current real UID, the current effective UID or the
current saved set-user-ID.
-
+.PP
A privileged process (on Linux, one having the \fBCAP_SETUID\fP capability)
may set its real UID, effective UID, and
saved set-user-ID to arbitrary values.
-
+.PP
If one of the arguments equals \-1, the corresponding value is not changed.
-
+.PP
Regardless of what changes are made to the real UID, effective UID,
and saved set-user-ID, the filesystem UID is always set to the same
value as the (possibly new) effective UID.
-
+.PP
Completely analogously,
.BR setresgid ()
sets the real GID, effective GID, and saved set-group-ID
On error, \-1 is returned, and
.I errno
is set appropriately.
-
+.PP
.IR Note :
there are cases where
.BR setresuid ()
Under HP-UX and FreeBSD, the prototype is found in
.IR <unistd.h> .
Under Linux, the prototype is provided by glibc since version 2.3.2.
-
+.PP
The original Linux
.BR setresuid ()
and