getresuid, getresgid - get real, effective, and saved user / group ID
#include <unistd.h>
int getresuid(uid_t*, uid_t*, uid_t*);
int getresgid(gid_t*, gid_t*, gid_t*);
Returns the real, effective, and saved user or group ID.
If the call was set successful, returns 0. Otherwise, returns -1 and sets errno
to describe the error.
EFAULT
: One of the passed pointers is not valid, writeable pointer in the current process.