Print this page
smf: switch to a tri-state for process-security properties true=on,false=off,nil=default
@@ -26,13 +26,17 @@
#ifndef _LIBSCF_H
#define _LIBSCF_H
#include <stddef.h>
-#include <sys/types.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,10 +199,30 @@
} 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
/*