1 /*
   2  * This file and its contents are supplied under the terms of the
   3  * Common Development and Distribution License ("CDDL"), version 1.0.
   4  * You may only use this file in accordance with the terms of version
   5  * 1.0 of the CDDL.
   6  *
   7  * A full copy of the text of the CDDL should have accompanied this
   8  * source.  A copy of the CDDL is also available via the Internet at
   9  * http://www.illumos.org/license/CDDL.
  10  */
  11 
  12 /* Copyright 2014, Richard Lowe */
  13 
  14 #ifndef _SYS_SECFLAGS_H
  15 #define _SYS_SECFLAGS_H
  16 
  17 #ifdef __cplusplus
  18 extern "C" {
  19 #endif
  20 
  21 #include <sys/types.h>
  22 
  23 typedef struct psecflags {
  24         uint_t psf_effective;
  25         uint_t psf_inherit;
  26 } psecflags_t;
  27 
  28 /*
  29  * p_secflags codes
  30  *
  31  * These flags indicate the extra security-related features enabled for a
  32  * given process.
  33  */
  34 #define PROC_SEC_ASLR   0x00000001
  35 /* All valid bits */
  36 #define PROC_SEC_MASK   (PROC_SEC_ASLR)
  37 
  38 /* psecflags(2) commands */
  39 typedef enum {
  40         PSECFLAGS_SET,
  41         PSECFLAGS_DISABLE,
  42         PSECFLAGS_ENABLE
  43 } psecflags_cmd_t;
  44 
  45 #ifdef __cplusplus
  46 }
  47 #endif
  48 
  49 #endif /* _SYS_SECFLAGS_H */