DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

getpriv(S)


getpriv -- get system privileges associated with this process

Syntax

cc . . . -lprot

#include <sys/types.h>
#include <sys/macro.h>
#include <sys/security.h>
#include <sys/audit.h>

int getpriv (privtype, privs) int privtype; priv_t *privs;

Description

The getpriv routine returns the system privilege vector for the current process in the vector argument privs. privs should have at least SEC_SPRIVVEC_SIZE entries. The argument privtype may only contain the privilege type SEC_EFFECTIVE_PRIV.

The system privilege vector contains per-process privileges used by the trusted control database. See setpriv(S) for a description of the privileges currently defined.

Return value

Upon successful completion, the getpriv routine returns the size, in bytes, of the privilege vector, privs. Otherwise, a value of -1 is returned and errno is set to indicate the appropriate error.

Diagnostics

If one of the following conditions occurs, getpriv fails and errno is set to the corresponding value:

[EFAULT]
privs points to an invalid address.

[EINVAL]
privtype is not SEC_EFFECTIVE_PRIV.

See also

setpriv(S)

Standards conformance

The getpriv routine is an extension of AT&T System V provided by the Santa Cruz Operation.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003