diff options
author | Tiago Natel de Moura <t.nateldemoura@f5.com> | 2020-08-20 15:22:58 +0100 |
---|---|---|
committer | Tiago Natel de Moura <t.nateldemoura@f5.com> | 2020-08-20 15:22:58 +0100 |
commit | a8a7eeb1fc7aada17d0d8fe8e15d325525986937 (patch) | |
tree | eb438829169ed66ced4c7c2a793a19a04fa2bc59 /src/nxt_process.h | |
parent | 9bf6efc55ac9678ad386fd1a9d420a3b75e9ab70 (diff) | |
download | unit-a8a7eeb1fc7aada17d0d8fe8e15d325525986937.tar.gz unit-a8a7eeb1fc7aada17d0d8fe8e15d325525986937.tar.bz2 |
Moved isolation related code to "nxt_isolation.c".
Diffstat (limited to 'src/nxt_process.h')
-rw-r--r-- | src/nxt_process.h | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/nxt_process.h b/src/nxt_process.h index ecd813e2..f2383687 100644 --- a/src/nxt_process.h +++ b/src/nxt_process.h @@ -60,6 +60,9 @@ typedef enum { typedef struct nxt_port_mmap_s nxt_port_mmap_t; +typedef struct nxt_process_s nxt_process_t; +typedef void (*nxt_isolation_cleanup_t)(nxt_task_t *task, + nxt_process_t *process); typedef struct { @@ -73,6 +76,8 @@ typedef struct { u_char *rootfs; nxt_array_t *mounts; /* of nxt_mount_t */ + nxt_isolation_cleanup_t cleanup; + #if (NXT_HAVE_CLONE) nxt_clone_t clone; #endif @@ -83,7 +88,7 @@ typedef struct { } nxt_process_isolation_t; -typedef struct { +struct nxt_process_s { nxt_pid_t pid; const char *name; nxt_queue_t ports; /* of nxt_port_t */ @@ -103,7 +108,7 @@ typedef struct { nxt_process_data_t data; nxt_process_isolation_t isolation; -} nxt_process_t; +}; typedef nxt_int_t (*nxt_process_prefork_t)(nxt_task_t *task, @@ -178,17 +183,6 @@ nxt_int_t nxt_process_creds_set(nxt_task_t *task, nxt_process_t *process, nxt_str_t *user, nxt_str_t *group); nxt_int_t nxt_process_apply_creds(nxt_task_t *task, nxt_process_t *process); -#if (NXT_HAVE_CLONE_NEWUSER) -nxt_int_t nxt_process_vldt_isolation_creds(nxt_task_t *task, - nxt_process_t *process); -#endif - -nxt_int_t nxt_process_change_root(nxt_task_t *task, nxt_process_t *process); - -#if (NXT_HAVE_ISOLATION_ROOTFS) -void nxt_process_unmount_all(nxt_task_t *task, nxt_process_t *process); -#endif - #if (NXT_HAVE_SETPROCTITLE) #define nxt_process_title(task, fmt, ...) \ |