au_getauthid(3) — LIBRARY FUNCTIONS
NAME
au_getauthid, au_setauthid − gets/sets the authentication ID of a process
SYNOPSIS
uid_t au_getauthid ()
int au_setauthid (id)
uid_t id;
DESCRIPTION
The au_getauthid system call is used to get (read) the authentication ID of the calling process. The authentication ID of the calling process is returned. Only a process with the user ID 0 (root) may get the authentication ID.
The au_setauthid system call is used to set (modify) the authentication ID of the calling process. Only a process with the user ID 0 (root) and an authentication ID of 0 may alter the authentication ID.
au_getauthid will fail if the following is true:
[EPERM] The calling process is not privileged.
au_setauthid will fail if any of the following are true:
[EPERM] The calling process is not privileged.
[EINVAL] The current authentication ID of the process is not 0.
[EINVAL] The ID is out of range.
DIAGNOSTICS
For au_getauthid, the value of the authentication ID is returned.
For au_setauthid, upon successful completion a value of 0 is returned. Otherwise, a value of −1 is returned and errno is set to indicate the error.
(Security Enhancement)