Print this page
Code review comments from jeffpc


   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 #include <sys/procset.h>
  23 
  24 struct proc;
  25 typedef uint32_t secflagset_t;
  26 
  27 typedef struct psecflags {
  28         secflagset_t psf_effective;
  29         secflagset_t psf_inherit;
  30         secflagset_t psf_lower;
  31         secflagset_t psf_upper;
  32 } psecflags_t;
  33 
  34 typedef struct secflagdelta {
  35         secflagset_t psd_add;           /* Flags to add */
  36         secflagset_t psd_rem;           /* Flags to remove */
  37         secflagset_t psd_assign;        /* Flags to assign */
  38         boolean_t psd_ass_active;       /* Need to assign */
  39 } secflagdelta_t;
  40 
  41 typedef enum {
  42         PSF_EFFECTIVE = 0,
  43         PSF_INHERIT,
  44         PSF_LOWER,
  45         PSF_UPPER




   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 #include <sys/procset.h>
  23 
  24 struct proc;
  25 typedef uint64_t secflagset_t;
  26 
  27 typedef struct psecflags {
  28         secflagset_t psf_effective;
  29         secflagset_t psf_inherit;
  30         secflagset_t psf_lower;
  31         secflagset_t psf_upper;
  32 } psecflags_t;
  33 
  34 typedef struct secflagdelta {
  35         secflagset_t psd_add;           /* Flags to add */
  36         secflagset_t psd_rem;           /* Flags to remove */
  37         secflagset_t psd_assign;        /* Flags to assign */
  38         boolean_t psd_ass_active;       /* Need to assign */
  39 } secflagdelta_t;
  40 
  41 typedef enum {
  42         PSF_EFFECTIVE = 0,
  43         PSF_INHERIT,
  44         PSF_LOWER,
  45         PSF_UPPER