jail: add support for userns and cgroupsns
[project/procd.git] / service / instance.h
index bdd14de737a50f53e53a1417f2c1a350b13b88d1..7e80c61946516112bef33b6f2a96761f52d5d826 100644 (file)
@@ -21,6 +21,7 @@
 #include "../utils/utils.h"
 
 #define RESPAWN_ERROR  (5 * 60)
+#define SIGNALLED_OFFSET 128
 
 struct jail {
        bool procfs;
@@ -28,6 +29,9 @@ struct jail {
        bool ubus;
        bool log;
        bool ronly;
+       bool netns;
+       bool userns;
+       bool cgroupsns;
        char *name;
        char *hostname;
        struct blobmsg_list mount;
@@ -42,8 +46,11 @@ struct service_instance {
        int8_t nice;
        bool valid;
 
+       char *user;
        uid_t uid;
-       gid_t gid;
+       gid_t pw_gid;
+       char *group;
+       gid_t gr_gid;
 
        bool halt;
        bool restart;
@@ -54,10 +61,14 @@ struct service_instance {
 
        bool trace;
        bool has_jail;
+       bool require_jail;
        bool no_new_privs;
        struct jail jail;
        char *seccomp;
        char *pidfile;
+       char *extroot;
+       int syslog_facility;
+       int exit_code;
 
        uint32_t term_timeout;
        uint32_t respawn_timeout;