Print this page
7029 want per-process exploit mitigation features (secflags)
7030 want basic address space layout randomization (aslr)
7031 noexec_user_stack should be a secflag
7032 want a means to forbid mappings around NULL.

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/librestart/common/librestart.h
          +++ new/usr/src/lib/librestart/common/librestart.h
↓ open down ↓ 24 lines elided ↑ open up ↑
  25   25  #ifndef _LIBRESTART_H
  26   26  #define _LIBRESTART_H
  27   27  
  28   28  #include <libsysevent.h>
  29   29  #include <libcontract.h>
  30   30  #include <libscf.h>
  31   31  #include <limits.h>
  32   32  #include <priv.h>
  33   33  #include <pwd.h>
  34   34  #include <sys/types.h>
       35 +#include <sys/secflags.h>
  35   36  
  36   37  #ifdef  __cplusplus
  37   38  extern "C" {
  38   39  #endif
  39   40  
  40   41  /*
  41   42   * There are 3 parts to librestart.
  42   43   *      1) The event protocol from the master restarter to its delegates.
  43   44   *      2) A functional interface for updating the repository.
  44   45   *      3) Convenience functions for common restarter tasks.
↓ open down ↓ 213 lines elided ↑ open up ↑
 258  259  const char *restarter_get_str_long(restarter_str_t);
 259  260  
 260  261  int restarter_store_contract(scf_instance_t *, ctid_t,
 261  262      restarter_contract_type_t);
 262  263  int restarter_remove_contract(scf_instance_t *, ctid_t,
 263  264      restarter_contract_type_t);
 264  265  
 265  266  ssize_t restarter_state_to_string(restarter_instance_state_t, char *, size_t);
 266  267  restarter_instance_state_t restarter_string_to_state(char *);
 267  268  
 268      -#define RESTARTER_METHOD_CONTEXT_VERSION        7
      269 +#define RESTARTER_METHOD_CONTEXT_VERSION        8
 269  270  
 270  271  struct method_context {
 271  272          /* Stable */
 272  273          uid_t           uid, euid;
 273  274          gid_t           gid, egid;
 274  275          int             ngroups;                /* -1 means use initgroups(). */
 275  276          gid_t           groups[NGROUPS_MAX];
      277 +        psecflags_t     def_secflags;
      278 +        secflagdelta_t  secflag_delta;
 276  279          priv_set_t      *lpriv_set, *priv_set;
 277  280          char            *corefile_pattern;      /* Optional. */
 278  281          char            *project;               /* NULL for no change */
 279  282          char            *resource_pool;         /* NULL for project default */
 280  283          char            *working_dir;           /* NULL for :default */
 281  284          char            **env;                  /* NULL for no env */
 282  285          size_t          env_sz;                 /* size of env array */
 283  286  
 284  287          /* Private */
 285  288          char            *vbuf;
↓ open down ↓ 63 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX