Copyright (c) 1983 Regents of the University of California.
All rights reserved. The Berkeley software License Agreement
specifies the terms and conditions for redistribution.
@(#)setuid.2 5.1 (Berkeley) 05/15/85
All rights reserved. The Berkeley software License Agreement
specifies the terms and conditions for redistribution.
@(#)setuid.2 5.1 (Berkeley) 05/15/85
SETUID 3 "1 April 1983"
C 5 NAME
setuid, seteuid, setruid, setgid, setegid, setrgid - set user and group ID
SYNOPSIS
setuid(uid) seteuid(euid) setruid(ruid)setgid(gid) setegid(egid) setrgid(rgid)
DESCRIPTION
Setuid ( setgid ) sets both the real and effective
user ID (group ID) of the current process to
as specified.
Seteuid ( setegid ) sets the effective user ID (group ID) of the current process.
Setruid ( setruid ) sets the real user ID (group ID) of the current process.
These calls are only permitted to the super-user or if the argument is the real or effective ID.
"SEE ALSO"
setreuid(2), setregid(2), getuid(2), getgid(2)
DIAGNOSTICS
Zero is returned if the user (group) ID is set;
-1 is returned otherwise.