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

*** 26,38 **** #ifndef _LIBSCF_H #define _LIBSCF_H #include <stddef.h> - #include <sys/types.h> #include <libnvpair.h> #ifdef __cplusplus extern "C" { #endif typedef struct scf_version *scf_version_t; --- 26,42 ---- #ifndef _LIBSCF_H #define _LIBSCF_H #include <stddef.h> #include <libnvpair.h> + #ifndef NATIVE_BUILD + #include <sys/secflags.h> + #endif /* NATIVE_BUILD */ + #include <sys/types.h> + #ifdef __cplusplus extern "C" { #endif typedef struct scf_version *scf_version_t;
*** 195,204 **** --- 199,228 ---- } scf_tmpl_error_type_t; typedef struct scf_tmpl_error scf_tmpl_error_t; /* + * This unfortunately needs to be public, because consumers of librestart must + * deal with it + */ + typedef struct { + #ifndef NATIVE_BUILD + secflagdelta_t ss_default; + secflagdelta_t ss_lower; + secflagdelta_t ss_upper; + #else + /* + * This is never used, but is necessary for bootstrapping. + * Not even the size matters. + */ + void *ss_default; + void *ss_lower; + void *ss_upper; + #endif /* NATIVE_BUILD */ + } scf_secflags_t; + + /* * scf_tmpl_strerror() human readable flag */ #define SCF_TMPL_STRERROR_HUMAN 0x1 /*