SETUID(3V) — UNKNOWN SECTION OF THE MANUAL
NAME
setuid − set user ID
SYNOPSIS
setuid(uid)
DESCRIPTION
setuid is used to set the real user ID and effective user ID of the calling process.
If the effective user ID of the calling process is super-user, the real user ID and effective user ID are set to uid.
If the effective user ID of the calling process is not super-user, but its real user ID is equal to uid, the effective user ID is set to uid.
If the effective user ID of the calling process is not super-user, but the saved set-user ID from execve(2) is equal to uid, the effective user ID is set to uid.
SEE ALSO
DIAGNOSTICS
Zero is returned if the user ID is set; −1 is returned otherwise, with the global variable errno set as for setreuid.
Sun Release 3.2 — Last change: 1 May 1986