aboutgitcodelistschat:MatrixIRC
path: root/cooker/calls/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'cooker/calls/process.c')
-rw-r--r--cooker/calls/process.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/cooker/calls/process.c b/cooker/calls/process.c
index b7a92f0..647f136 100644
--- a/cooker/calls/process.c
+++ b/cooker/calls/process.c
@@ -27,6 +27,7 @@ clone3
#include <asm-generic/unistd.h>
#include <sys/syscall.h>
+#define _GNU_SOURCE
#include <unistd.h>
#include <sched.h>
#include <linux/kcmp.h>
@@ -35,11 +36,26 @@ clone3
#include "../cooker.h"
#include "../calls.h"
+static struct num unshare_flags[] = {
+ { "CLONE_FILES", CLONE_FILES },
+ { "CLONE_FS", CLONE_FS },
+ { "CLONE_NEWCGROUP", CLONE_NEWCGROUP },
+ { "CLONE_NEWIPC", CLONE_NEWIPC },
+ { "CLONE_NEWNET", CLONE_NEWNET },
+ { "CLONE_NEWNS", CLONE_NEWNS },
+ { "CLONE_NEWPID", CLONE_NEWPID },
+ { "CLONE_NEWTIME", CLONE_NEWTIME },
+ { "CLONE_NEWUSER", CLONE_NEWUSER },
+ { "CLONE_NEWUTS", CLONE_NEWUTS },
+ { "CLONE_SYSVSEM", CLONE_SYSVSEM },
+ { 0 }
+};
+
static struct arg unshare_args[] = {
{ 0,
{
- "flags", UNDEF /* TODO */, FLAGS, 0, 0,
- { 0 /* TODO */ }
+ "flags", INT, FLAGS, 0, 0,
+ { .d_num = unshare_flags }
}
}
};