diff options
author | Andrei Belov <defan@nginx.com> | 2020-05-28 18:13:06 +0300 |
---|---|---|
committer | Andrei Belov <defan@nginx.com> | 2020-05-28 18:13:06 +0300 |
commit | 733c14e991d6b2d5bdae5202ae9f090d022bc956 (patch) | |
tree | 120562db5d30e5f4f51d001397f765f5cebab999 /src/nxt_clone.h | |
parent | 6a8d4571d7fc89a951b4da80c39a93fcaa634406 (diff) | |
parent | 9d8e476c4e3695019b0a1fe3696d3411a8393de6 (diff) | |
download | unit-733c14e991d6b2d5bdae5202ae9f090d022bc956.tar.gz unit-733c14e991d6b2d5bdae5202ae9f090d022bc956.tar.bz2 |
Merged with the default branch.
Diffstat (limited to 'src/nxt_clone.h')
-rw-r--r-- | src/nxt_clone.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/nxt_clone.h b/src/nxt_clone.h index dcccf1db..e89fd82d 100644 --- a/src/nxt_clone.h +++ b/src/nxt_clone.h @@ -3,8 +3,8 @@ * Copyright (C) NGINX, Inc. */ -#ifndef _NXT_CLONE_INCLUDED_ -#define _NXT_CLONE_INCLUDED_ +#ifndef _NXT_CLONE_H_INCLUDED_ +#define _NXT_CLONE_H_INCLUDED_ #if (NXT_HAVE_CLONE_NEWUSER) @@ -36,10 +36,14 @@ typedef struct { pid_t nxt_clone(nxt_int_t flags); +#define nxt_is_clone_flag_set(flags, test) \ + ((flags & CLONE_##test) == CLONE_##test) + + #if (NXT_HAVE_CLONE_NEWUSER) -#define NXT_CLONE_USER(flags) \ - ((flags & CLONE_NEWUSER) == CLONE_NEWUSER) +#define NXT_CLONE_MNT(flags) \ + ((flags & CLONE_NEWNS) == CLONE_NEWNS) NXT_EXPORT nxt_int_t nxt_clone_credential_map(nxt_task_t *task, pid_t pid, nxt_credential_t *creds, nxt_clone_t *clone); @@ -50,4 +54,5 @@ NXT_EXPORT nxt_int_t nxt_clone_vldt_credential_gidmap(nxt_task_t *task, #endif -#endif /* _NXT_CLONE_INCLUDED_ */ + +#endif /* _NXT_CLONE_H_INCLUDED_ */ |