bsd man page for setegid

Query: setegid

OS: bsd

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

SETUID(3)						     Library Functions Manual							 SETUID(3)

NAME
setuid, seteuid, setruid, setgid, setegid, setrgid - set user and group ID
SYNOPSIS
#include <sys/types.h> setuid(uid) seteuid(euid) setruid(ruid) uid_t uid, euid, ruid; setgid(gid) setegid(egid) setrgid(rgid) gid_t gid, egid, 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 (setrgid) 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. 4.2 Berkeley Distribution May 12, 1986 SETUID(3)
Related Man Pages
setgid(2) - mojave
seteuid(2) - opendarwin
setgid(2) - opendarwin
seteuid(3) - ultrix
setrgid(3) - ultrix
Similar Topics in the Unix Linux Community
command execution alert
How to use newgrp or sg in user mode without password prompt?
Combine Both Output from the awk Script
I can't compile (gcc) in Solaris 11.3 non global zone