privileges(3)privileges(3)NAME
privileges: priv_addset(), priv_delset(), priv_ismember(), priv_isob‐
served(), privset_add(), privset_alloc(), privset_copy(),
privset_del(), privset_empty(), privset_fill(), privset_free(),
privset_intersect(), privset_inverse(), privset_isempty(), privset_ise‐
qual(), privset_isfull(), privset_ismember(), privset_issubset(),
privset_subtract(), privset_union() - privilege manipulation operations
for checking and debugging purposes
SYNOPSIS
Parameters
dstp to type; points to the destination privilege set.
num type; specifies a privilege by number.
privid type; contains the ID of the privilege to be acted
upon.
privname type; string that contains the name of the privilege
to be acted upon.
privp Pointer to type; points to the privilege set to be
acted upon.
srcp to type; points to the source privilege set.
DESCRIPTION
Adds the privilege privname to the privilege set referred to by
privp.
Removes the privilege
privname from the privilege set referred to by privp.
Check whether the named privilege
privname is a member of the privilege set privp.
Checks whether the calling process observes the named privilege
privname See privileges.5 for more information on when a
process observes a privilege.
Adds the privilege
privid to the privilege set referred to by dstp.
Allocates memory for a privilege set of type
but does not initialize the space. The space allocated
by this routine should be released using the routine.
Copies the privilege set referred to by
srcp to the privilege set referred to by dstp.
Removes the privilege specified by
num from the privilege set referred to by privp.
Clears all privileges from
privp.
Assigns all privileges, including those not currently define on
the system, to
the privilege set privp.
Deallocates the space used by the privilege set referred to by
privp. If privp is NULL, no action occurs.
Finds the privileges that the privilege sets
srcp and dstp have in common and places the results in
the privilege set dstp.
Inverts the privilege set pointed to by
privp.
Checks whether the privilege set
privp is the empty set.
Checks whether the privilege sets
srcp and dstp are equal sets.
Check whether the privilege set
privp is the full set of privileges. A full set of priv‐
ileges is a set with all bits set, regardless of whether
the privilege is currently defined on the system.
Check whether the privilege
privid is a member of the privilege set privp.
Checks whether the privilege set
srcp is a subset of the privilege set dstp.
Subtracts the privilege set referred to by
srcp from the privilege set referred to by dstp.
Checks the privileges in the privilege sets
srcp and dstp and puts any privilege that is in either
set into dstp.
RETURN VALUE
and return the following values:
Successful completion.
Function failed.
is set to indicate the error.
and return the following values:
Non-zero number.
Condition is TRUE.
Condition is FALSE.
is set to indicate the error.
returns the following values:
pointer Successful completions. Returns a non-null pointer to
the allocated space.
NULL pointer
Function failed. Returns a null pointer and sets to
indicate the error .
ERRORS
If any of the following conditions occur, the functions fail and set
Insufficient memory available to allocate space to hold a privi‐
lege set.
The application can try again later.
Invalid argument.
SEE ALSOpriv_getbyname(3), priv_getbynum(3), priv_set_to_str(3),
priv_str_to_set(3), privileges(5).
privileges(3)