priv_addset man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

PRIV_ADDSET(3C)						       PRIV_ADDSET(3C)

NAME
       priv_addset,  priv_allocset,  priv_copyset, priv_delset, priv_emptyset,
       priv_fillset, priv_freeset, priv_intersect, priv_inverse, priv_isempty‐
       set,  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_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_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(5) for descriptions of the following attributes:

       ┌────────────────────┬─────────────────┐
       │  ATTRIBUTE TYPE    │ ATTRIBUTE VALUE │
       ├────────────────────┼─────────────────┤
       │Interface Stability │ Evolving	      │
       ├────────────────────┼─────────────────┤
       │MT-Level	    │ MT-Safe	      │
       └────────────────────┴─────────────────┘

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

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.

				 Jan 28, 2005		       PRIV_ADDSET(3C)
[top]

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net