summaryrefslogtreecommitdiffhomepage
path: root/auto/isolation
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--auto/isolation29
1 files changed, 21 insertions, 8 deletions
diff --git a/auto/isolation b/auto/isolation
index cbf42d9d..c535e80a 100644
--- a/auto/isolation
+++ b/auto/isolation
@@ -4,7 +4,7 @@
# Linux clone syscall.
NXT_ISOLATION=NO
-NXT_HAVE_CLONE=NO
+NXT_HAVE_LINUX_NS=NO
NXT_HAVE_CLONE_NEWUSER=NO
NXT_HAVE_MOUNT=NO
NXT_HAVE_UNMOUNT=NO
@@ -12,21 +12,21 @@ NXT_HAVE_ROOTFS=NO
nsflags="USER NS PID NET UTS CGROUP"
-nxt_feature="clone(2)"
-nxt_feature_name=NXT_HAVE_CLONE
+nxt_feature="Linux unshare()"
+nxt_feature_name=NXT_HAVE_LINUX_NS
nxt_feature_run=no
nxt_feature_incs=
nxt_feature_libs=
-nxt_feature_test="#include <sys/wait.h>
- #include <sys/syscall.h>
+nxt_feature_test="#define _GNU_SOURCE
+ #include <sched.h>
int main(void) {
- return SYS_clone | SIGCHLD;
+ return unshare(0);
}"
. auto/feature
if [ $nxt_found = yes ]; then
- NXT_HAVE_CLONE=YES
+ NXT_HAVE_LINUX_NS=YES
# Test all isolation flags
for flag in $nsflags; do
@@ -90,7 +90,7 @@ nxt_feature_test="#include <mntent.h>
nxt_feature="prctl(PR_SET_NO_NEW_PRIVS)"
-nxt_feature_name=NXT_HAVE_PR_SET_NO_NEW_PRIVS0
+nxt_feature_name=NXT_HAVE_PR_SET_NO_NEW_PRIVS
nxt_feature_run=no
nxt_feature_incs=
nxt_feature_libs=
@@ -102,6 +102,19 @@ nxt_feature_test="#include <sys/prctl.h>
. auto/feature
+nxt_feature="prctl(PR_SET_CHILD_SUBREAPER)"
+nxt_feature_name=NXT_HAVE_PR_SET_CHILD_SUBREAPER
+nxt_feature_run=no
+nxt_feature_incs=
+nxt_feature_libs=
+nxt_feature_test="#include <sys/prctl.h>
+
+ int main(void) {
+ return PR_SET_CHILD_SUBREAPER;
+ }"
+. auto/feature
+
+
nxt_feature="Linux mount()"
nxt_feature_name=NXT_HAVE_LINUX_MOUNT
nxt_feature_run=no