seteuid(2) DG/UX R4.11MU05 seteuid(2)
NAME
seteuid - set the effective user id of the current process
SYNOPSIS
#include <sys/types.h>
pid_t seteuid(gid_t euid);
where:
euid An effective user identifier
DESCRIPTION
If the calling process has appropriate privilege, effective-user-id
is set to euid.
If the calling process does not have appropriate privilege, but its
real-user-id or its effective-user-id or its saved-user-id is equal
to euid, the effective-user-id is set to euid.
For systems supporting the DG/UX Capability Option, appropriate
privilege is defined as having one or more specific capabilities
enabled in the effective capability set of the calling process. See
cap_defaults(5) for the default capability for this system call.
On systems without the DG/UX Capability Option, appropriate privilege
means that the process has an effective UID of root. See the
appropriate_privilege(5) man page for more information.
ACCESS CONTROL
See the description above.
RETURN VALUE
Upon successful completion, the function seteuid returns zero.
Otherwise, it returns -1 and sets errno to indicate an error.
DIAGNOSTICS
Under the following conditions, the function seteuid fails and sets
errno to:
EPERM An attempt was made to set the effective-user-id to a value
not permitted by the access control restrictions described
above.
EINVAL The supplied value of euid was negative or greater than the
maximum allowable user id.
SEE ALSO
getuid(2), geteuid(2), getgid(2), setuid(2), setgid(2), setregid(2),
setreuid(2) appropriate_privilege(5).
cap_defaults(5).
Licensed material--property of copyright holder(s)