SETOID(2) Domain/OS SysV SETOID(2)
NAME
setoid - set organization ID
SYNOPSIS
int setoid (oid)
int oid;
DESCRIPTION
setoid is used to set the real and effective organization IDs of the
calling process.
If the effective user ID of the calling process is super-user, the real
and effective organization IDs are set to oid.
If the effective user ID of the calling process is not super-user, but
its real organization ID is equal to oid, the effective organization ID
is set to oid.
If the effective user ID of the calling process is not super-user, but
the saved set-organization ID from exec(2) is equal to oid, the effective
organization ID is set to oid.
ERRORS
setoid will fail if the following is true:
[EPERM] The real organization ID of the calling process is not equal
to oid and its effective user ID is not super-user.
SEE ALSO
intro(2), getoid(2), getuid(2), setuid(2).
DIAGNOSTICS
Upon successful completion, a value of 0 is returned. Otherwise, a value
of -1 is returned and errno is set to indicate the error.