Print this page
uts: add a concept of a 'default' set of privileges, separate from 'basic'

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libc/inc/priv_private.h
          +++ new/usr/src/lib/libc/inc/priv_private.h
↓ open down ↓ 19 lines elided ↑ open up ↑
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27   27  #ifndef _PRIV_PRIVATE_H
  28   28  #define _PRIV_PRIVATE_H
  29   29  
  30      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  31      -
  32   30  #include <sys/types.h>
  33   31  #include <sys/priv.h>
  34   32  #include <limits.h>
  35   33  
  36   34  /*
  37   35   * Libc private privilege data.
  38   36   */
  39   37  
  40   38  #ifdef __cplusplus
  41   39  extern "C" {
↓ open down ↓ 44 lines elided ↑ open up ↑
  86   84   */
  87   85  typedef struct priv_data {
  88   86          size_t                  pd_setsize;             /* In bytes */
  89   87          int                     pd_nsets, pd_nprivs;
  90   88          uint32_t                pd_ucredsize;
  91   89          char                    **pd_setnames;
  92   90          char                    **pd_privnames;
  93   91          int                     *pd_setsort;
  94   92          priv_impl_info_t        *pd_pinfo;
  95   93          priv_set_t              *pd_basicset;
       94 +        priv_set_t              *pd_defaultset;
  96   95          priv_set_t              *pd_zoneset;
  97   96  } priv_data_t;
  98   97  
  99   98  extern priv_data_t *__priv_getdata(void);
 100   99  extern priv_data_t *__priv_parse_info(priv_impl_info_t *);
 101  100  extern void __priv_free_info(priv_data_t *);
 102  101  extern priv_data_t *privdata;
 103  102  
 104  103  extern int lock_data(void);
 105  104  extern boolean_t refresh_data(void);
↓ open down ↓ 1 lines elided ↑ open up ↑
 107  106  
 108  107  extern boolean_t __priv_isemptyset(priv_data_t *, const priv_set_t *);
 109  108  extern boolean_t __priv_isfullset(priv_data_t *, const priv_set_t *);
 110  109  extern boolean_t __priv_issubset(priv_data_t *, const priv_set_t *,
 111  110                                  const priv_set_t *);
 112  111  extern const char *__priv_getbynum(const priv_data_t *, int);
 113  112  
 114  113  extern int getprivinfo(priv_impl_info_t *, size_t);
 115  114  
 116  115  extern priv_set_t *priv_basic(void);
      116 +extern priv_set_t *priv_default(void);
 117  117  
 118  118  #ifdef __cplusplus
 119  119  }
 120  120  #endif
 121  121  
 122  122  #endif /* _PRIV_PRIVATE_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX