priv_addset(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

priv_addset(3c)

Standard C Library Functions                                   priv_addset(3C)



NAME
       priv_addset,  priv_allocset,  priv_copyset, priv_delset, priv_emptyset,
       priv_basicset,     priv_fillset,     priv_freeset,      priv_intersect,
       priv_inverse,    priv_isemptyset,    priv_isequalset,   priv_isfullset,
       priv_ismember, priv_issubset, priv_union - privilege  set  manipulation
       functions

SYNOPSIS
       #include <priv.h>

       int priv_addset(priv_set_t *sp, const char *priv);


       priv_set_t *priv_allocset(void);


       void priv_copyset(const priv_set_t *src, priv_set_t *dst);


       int priv_delset(priv_set_t *sp, const char *priv);


       void priv_emptyset(priv_set_t *sp);


       void priv_basicset(priv_set_t *sp);


       void priv_fillset(priv_set_t *sp);


       void priv_freeset(priv_set_t *sp);


       void priv_intersect(const priv_set_t *src, priv_set_t *dst);


       void priv_inverse(priv_set_t *sp);


       boolean_t priv_isemptyset(const priv_set_t *sp);


       boolean_t priv_isequalset(const priv_set_t *src, const priv_set_t *dst);


       boolean_t priv_isfullset(const priv_set_t *sp);


       boolean_t priv_ismember(const priv_set_t *sp, const char *priv);


       boolean_t priv_issubset(const priv_set_t *src, const priv_set_t *dst);


       void priv_union(const priv_set_t *src, priv_set_t *dst);

DESCRIPTION
       The  sp, src, and dst arguments point to privilege sets. The priv argu‐
       ment points to a named privilege.


       The priv_addset() function adds the named privilege priv to sp.


       The priv_allocset() function allocates sufficient memory to  contain  a
       privilege  set.  The  value of the returned privilege set is indetermi‐
       nate. The function returns NULL and sets errno when it fails  to  allo‐
       cate memory.


       The priv_copyset() function copies the set src to dst.


       The priv_delset() function removes the named privilege priv from sp.


       The priv_emptyset() function clears all privileges from sp.


       The priv_basicset() function copies the basic privilege set to sp.


       The priv_fillset() function asserts all privileges in sp, including the
       privileges not currently defined in the system.


       The priv_freeset() function frees the storage allocated by  priv_alloc‐
       set().


       The  priv_intersect()  function  intersects src with dst and places the
       results in dst.


       The priv_inverse() function inverts the privilege set given as argument
       in place.


       The  priv_isemptyset() function checks whether the argument is an empty
       set.


       The priv_isequalset() function checks whether the privilege set src  is
       equal to dst.


       The  priv_isfullset()  function  checks  whether the argument is a full
       set. A full set is a set with all bits set, regardless of  whether  the
       privilege is currently defined in the system.


       The priv_ismember() function checks whether the named privilege priv is
       a member of sp.


       The priv_issubset() function checks whether src is a subset of dst.


       The priv_union() function takes the union of src and dst and places the
       result in dst.

RETURN VALUES
       Upon  successful  completion,  priv_allocset()  returns a pointer to an
       opaque data structure. It returns NULL if memory allocation  fails  and
       sets errno to indicate the error.


       Upon   successful   completion,   priv_isemptyset(),  priv_isfullset(),
       priv_isequalset(), priv_issubset(), and priv_ismember() return  B_TRUE.
       Otherwise, they return B_FALSE.


       Upon  successful  completion, priv_delset() and priv_addset() return 0.
       Otherwise, they return -1 and set errno to indicate the error.

ERRORS
       The priv_allocset() function will fail if:

       ENOMEM    The physical limits of the system are exceeded by the  memory
                 allocation needed to hold a privilege set.


       EAGAIN    There  is insufficient memory for allocation to hold a privi‐
                 lege set. The application can try again later.



       The priv_delset() and priv_addset() functions will fail if:

       EINVAL    The privilege argument is not a valid privilege name.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe


SEE ALSO
       setppriv(2),  malloc(3C),  priv_str_to_set(3C),  attributes(7),  privi‐
       leges(7)

NOTES
       The functions that compare sets operate on all bits of the set, regard‐
       less  of  whether  the specific privileges are currently defined in the
       system.



Oracle Solaris 11.4               12 Jan 2010                  priv_addset(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3