X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fprocd.git;a=blobdiff_plain;f=service%2Finstance.h;h=770000001b62c993d5a6902bbe685d127d0df5ca;hp=e7416ab04222d96c9f8d75ce911f6bd3655ab10c;hb=dfd5816bcbef980b11c8a286f8f52a434651c528;hpb=7fbc2759ceb90306a34b30ffd04c8afef94a3aea diff --git a/service/instance.h b/service/instance.h index e7416ab..7700000 100644 --- a/service/instance.h +++ b/service/instance.h @@ -17,10 +17,22 @@ #include #include +#include #include "../utils/utils.h" #define RESPAWN_ERROR (5 * 60) +struct jail { + bool procfs; + bool sysfs; + bool ubus; + bool log; + bool ronly; + char *name; + struct blobmsg_list mount; + int argc; +}; + struct service_instance { struct vlist_node node; struct service *srv; @@ -29,12 +41,21 @@ struct service_instance { int8_t nice; bool valid; + uid_t uid; + gid_t gid; + bool halt; bool restart; bool respawn; int respawn_count; struct timespec start; + bool trace; + bool has_jail; + bool no_new_privs; + struct jail jail; + char *seccomp; + uint32_t respawn_timeout; uint32_t respawn_threshold; uint32_t respawn_retry; @@ -42,6 +63,8 @@ struct service_instance { struct blob_attr *config; struct uloop_process proc; struct uloop_timeout timeout; + struct ustream_fd _stdout; + struct ustream_fd _stderr; struct blob_attr *command; struct blob_attr *trigger; @@ -50,6 +73,7 @@ struct service_instance { struct blobmsg_list netdev; struct blobmsg_list file; struct blobmsg_list limits; + struct blobmsg_list errors; }; void instance_start(struct service_instance *in);