seteuid(3)
NAME
seteuid, setruid, setegid, setrgid − set real and effective user and group IDs
SYNTAX
int seteuid(euid)
int euid;
int setruid(ruid)
int ruid;
int setegid(egid)
int egid;
int setrgid(rgid)
int rgid;
DESCRIPTION
The seteuid and setegid subroutines set the effective user ID and group ID of the current process.
The setruid and setrgid subroutines set the real user ID and group ID of the current process.
RESTRICTIONS
These calls are only permitted either to the superuser or if the argument is the real or effective ID.
RETURN VALUE
If unsuccessful, all return a −1.