setreuid(3)
DESCRIPTION
Sets the process real and effective UIDs. Astia's direct ABI uses the unsigned all‑ones value for the libc −1 sentinel.
SYNOPSIS
#include <unistd.h> int setreuid(uid_t real_uid, uid_t effective_uid);
RETURN VALUE
- Returns zero, or -1 and sets errno.
ERRORS
-EINVAL- An argument is outside the direct ABI range.
-EPERM- The requested transition is not allowed.
-ESRCH- The calling process does not exist.
NOTES
The current implementation accepts the current real or effective UID for a non‑root caller.