GETPRIV(S) UNIX System V GETPRIV(S)
Name
getpriv - get system privileges associated with this process
Syntax
#include <sys/types.h>
#include <sys/macros.h>
#include <sys/security.h>
#include <sys/audit.h>
int getpriv (privtype, privs)
int privtype;
priv_t *privs;
Description
getpriv returns the system privilege vector for this process
in the user-supplied privs vector. This vector should have
at least SEC_SPRIVVEC_SIZE entries. The privtype argument
may only contain the privilege type SEC_EFFECTIVE_PRIV.
The system privilege vector contains per-process privileges
used by the TCB. See setpriv(S) for a description of the
privileges currently defined.
getpriv will fail if the following is true:
[EFAULT] Privs points to an invalid address.
[EINVAL] Privtype is not SEC_EFFECTIVE_PRIV.
RETURN VALUE
Upon successful completion a value of 0 is returned.
Otherwise, a value of -1 is returned and errno is set to
indicate the error.
See Also
setpriv(S)
Value Added
getpriv is an extension of AT&T System V provided by the
Santa Cruz Operation.
(printed 6/20/89)