Other Aliasgetresgid, getresuid, setresuid
SYNOPSISIn sys/types.h In unistd.h Ft int Fn getresgid gid_t *rgid gid_t *egid gid_t *sgid Ft int Fn getresuid uid_t *ruid uid_t *euid uid_t *suid Ft int Fn setresgid gid_t rgid gid_t egid gid_t sgid Ft int Fn setresuid uid_t ruid uid_t euid uid_t suid
DESCRIPTIONThe Fn setresuid system call sets the real, effective and saved user IDs of the current process. The analogous Fn setresgid sets 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.
The Fn getresgid and Fn getresuid calls retrieve the real, effective, and saved group and user IDs of the current process, respectively.
RETURN VALUESRv -std
- Bq Er EPERM
- 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.
- Bq Er EFAULT
- An address passed to Fn getresgid or Fn getresuid was invalid.
STANDARDSThese system calls are not available on many platforms. They exist in Fx to support Linux binaries linked against GNU libc2.
HISTORYThese functions first appeared in HP-UX.