int setuids(uid_t uid, uid_t euid);
This syscall sets the UID and effective UID of the calling process. If the
calling process has the MAC_CAP_SETUID
capability, it will set both
the EUID and UID, else, it will only try to set EUID to values matching the
process’s UID. If any of them is -1
, it will not be modified.
The syscall returns 0
on success or -1
on failure, with the
following errno:
EPERM
MAC did not allow this.