February 7, 2015
getresgid, getresuid, setresgid, setresuid - get or set real, effective and saved user or group ID
.In unistd.h int
getresgid gid_t *rgid gid_t *egid gid_t *sgidint
getresuid uid_t *ruid uid_t *euid uid_t *suidint
setresgid gid_t rgid gid_t egid gid_t sgidint
setresuid uid_t ruid uid_t euid uid_t suid
setresuidsystem call sets the real, effective and saved user IDs of the current process. The analogous
setresgidsets the real, effective and saved group IDs.
Privileged processes may set these IDs to arbitrary values. Unprivileged processes are restricted in that each of the new IDs must match one of the current IDs.
Passing -1 as an argument causes the corresponding value to remain unchanged.
getresuidcalls retrieve the real, effective, and saved group and user IDs of the current process, respectively.
|The calling process was not privileged and tried to change one or more IDs to a value which was not the current real ID, the current effective ID nor the current saved ID.|
|An address passed to
These functions first appeared in HP-UX.