Print this page
smf: switch to a tri-state for process-security properties true=on,false=off,nil=default

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libscf/inc/libscf.h
          +++ new/usr/src/lib/libscf/inc/libscf.h
↓ open down ↓ 20 lines elided ↑ open up ↑
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   */
  25   25  
  26   26  #ifndef _LIBSCF_H
  27   27  #define _LIBSCF_H
  28   28  
  29   29  
  30   30  #include <stddef.h>
  31      -#include <sys/types.h>
  32   31  #include <libnvpair.h>
  33   32  
       33 +#ifndef NATIVE_BUILD
       34 +#include <sys/secflags.h>
       35 +#endif  /* NATIVE_BUILD */
       36 +#include <sys/types.h>
       37 +
  34   38  #ifdef  __cplusplus
  35   39  extern "C" {
  36   40  #endif
  37   41  
  38   42  typedef struct scf_version *scf_version_t;
  39   43  #define SCF_VERSION     ((scf_version_t)1UL)
  40   44  
  41   45  /*
  42   46   * Opaque structures
  43   47   */
↓ open down ↓ 146 lines elided ↑ open up ↑
 190  194                                          /* values for include_values */
 191  195          SCF_TERR_PG_PATTERN_INCOMPLETE, /* Required pg_pattern is missing */
 192  196                                          /* name or type attribute. */
 193  197          SCF_TERR_PROP_PATTERN_INCOMPLETE    /* Required prop_pattern is */
 194  198                                              /* missing a type attribute. */
 195  199  } scf_tmpl_error_type_t;
 196  200  
 197  201  typedef struct scf_tmpl_error scf_tmpl_error_t;
 198  202  
 199  203  /*
      204 + * This unfortunately needs to be public, because consumers of librestart must
      205 + * deal with it
      206 + */
      207 +typedef struct {
      208 +#ifndef NATIVE_BUILD
      209 +        secflagdelta_t ss_default;
      210 +        secflagdelta_t ss_lower;
      211 +        secflagdelta_t ss_upper;
      212 +#else
      213 +        /*
      214 +         * This is never used, but is necessary for bootstrapping.
      215 +         * Not even the size matters.
      216 +         */
      217 +        void *ss_default;
      218 +        void *ss_lower;
      219 +        void *ss_upper;
      220 +#endif /* NATIVE_BUILD */
      221 +} scf_secflags_t;
      222 +
      223 +/*
 200  224   * scf_tmpl_strerror() human readable flag
 201  225   */
 202  226  #define SCF_TMPL_STRERROR_HUMAN 0x1
 203  227  
 204  228  /*
 205  229   * Standard services
 206  230   */
 207  231  #define SCF_SERVICE_CONFIGD     ((const char *) \
 208  232                                      "svc:/system/svc/repository:default")
 209  233  #define SCF_INSTANCE_GLOBAL     ((const char *) \
↓ open down ↓ 640 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX