Print this page
uts: add a concept of a 'default' set of privileges, separate from 'basic'
   1 PRIV_ADDSET(3C)          Standard C Library Functions          PRIV_ADDSET(3C)
   2 
   3 
   4 
   5 NAME
   6        priv_addset, priv_allocset, priv_copyset, priv_delset, priv_emptyset,
   7        priv_basicset, priv_fillset, priv_freeset, priv_intersect,
   8        priv_inverse, priv_isemptyset, priv_isequalset, priv_isfullset,
   9        priv_ismember, priv_issubset, priv_union - privilege set manipulation
  10        functions
  11 
  12 SYNOPSIS
  13        #include <priv.h>
  14 
  15        int priv_addset(priv_set_t *sp, const char *priv);
  16 
  17 
  18        priv_set_t *priv_allocset(void);
  19 
  20 
  21        void priv_copyset(const priv_set_t *src, priv_set_t *dst);
  22 
  23 
  24        int priv_delset(priv_set_t *sp, const char *priv);
  25 
  26 
  27        void priv_emptyset(priv_set_t *sp);
  28 
  29 
  30        void priv_basicset(priv_set_t *sp);
  31 
  32 



  33        void priv_fillset(priv_set_t *sp);
  34 
  35 
  36        void priv_freeset(priv_set_t *sp);
  37 
  38 
  39        void priv_intersect(const priv_set_t *src, priv_set_t *dst);
  40 
  41 
  42        void priv_inverse(priv_set_t *sp);
  43 
  44 
  45        boolean_t priv_isemptyset(const priv_set_t *sp);
  46 
  47 
  48        boolean_t priv_isequalset(const priv_set_t *src, const priv_set_t *dst);
  49 
  50 
  51        boolean_t priv_isfullset(const priv_set_t *sp);
  52 


  69 
  70 
  71        The priv_allocset() function allocates sufficient memory to contain a
  72        privilege set. The value of the returned privilege set is
  73        indeterminate. The function returns NULL and sets errno when it fails
  74        to allocate memory.
  75 
  76 
  77        The priv_copyset() function copies the set src to dst.
  78 
  79 
  80        The priv_delset() function removes the named privilege priv from sp.
  81 
  82 
  83        The priv_emptyset() function clears all privileges from sp.
  84 
  85 
  86        The priv_basicset() function copies the basic privilege set to sp.
  87 
  88 



  89        The priv_fillset() function asserts all privileges in sp, including the
  90        privileges not currently defined in the system.
  91 
  92 
  93        The priv_freeset() function frees the storage allocated by
  94        priv_allocset().
  95 
  96 
  97        The priv_intersect() function intersects src with dst and places the
  98        results in dst.
  99 
 100 
 101        The priv_inverse() function inverts the privilege set given as argument
 102        in place.
 103 
 104 
 105        The priv_isemptyset() function checks whether the argument is an empty
 106        set.
 107 
 108 


   1 PRIV_ADDSET(3C)          Standard C Library Functions          PRIV_ADDSET(3C)
   2 
   3 
   4 
   5 NAME
   6        priv_addset, priv_allocset, priv_copyset, priv_delset, priv_emptyset,
   7        priv_basicset, priv_defaultset, priv_fillset, priv_freeset,
   8        priv_intersect, priv_inverse, priv_isemptyset, priv_isequalset,
   9        priv_isfullset, priv_ismember, priv_issubset, priv_union - privilege
  10        set manipulation functions
  11 
  12 SYNOPSIS
  13        #include <priv.h>
  14 
  15        int priv_addset(priv_set_t *sp, const char *priv);
  16 
  17 
  18        priv_set_t *priv_allocset(void);
  19 
  20 
  21        void priv_copyset(const priv_set_t *src, priv_set_t *dst);
  22 
  23 
  24        int priv_delset(priv_set_t *sp, const char *priv);
  25 
  26 
  27        void priv_emptyset(priv_set_t *sp);
  28 
  29 
  30        void priv_basicset(priv_set_t *sp);
  31 
  32 
  33        void priv_defaultset(priv_set_t *sp);
  34 
  35 
  36        void priv_fillset(priv_set_t *sp);
  37 
  38 
  39        void priv_freeset(priv_set_t *sp);
  40 
  41 
  42        void priv_intersect(const priv_set_t *src, priv_set_t *dst);
  43 
  44 
  45        void priv_inverse(priv_set_t *sp);
  46 
  47 
  48        boolean_t priv_isemptyset(const priv_set_t *sp);
  49 
  50 
  51        boolean_t priv_isequalset(const priv_set_t *src, const priv_set_t *dst);
  52 
  53 
  54        boolean_t priv_isfullset(const priv_set_t *sp);
  55 


  72 
  73 
  74        The priv_allocset() function allocates sufficient memory to contain a
  75        privilege set. The value of the returned privilege set is
  76        indeterminate. The function returns NULL and sets errno when it fails
  77        to allocate memory.
  78 
  79 
  80        The priv_copyset() function copies the set src to dst.
  81 
  82 
  83        The priv_delset() function removes the named privilege priv from sp.
  84 
  85 
  86        The priv_emptyset() function clears all privileges from sp.
  87 
  88 
  89        The priv_basicset() function copies the basic privilege set to sp.
  90 
  91 
  92        The priv_defaultset() function copies the default privilege set to sp.
  93 
  94 
  95        The priv_fillset() function asserts all privileges in sp, including the
  96        privileges not currently defined in the system.
  97 
  98 
  99        The priv_freeset() function frees the storage allocated by
 100        priv_allocset().
 101 
 102 
 103        The priv_intersect() function intersects src with dst and places the
 104        results in dst.
 105 
 106 
 107        The priv_inverse() function inverts the privilege set given as argument
 108        in place.
 109 
 110 
 111        The priv_isemptyset() function checks whether the argument is an empty
 112        set.
 113 
 114