3 * This demonstrates how to use SECCOMP_MODE_STRICT to sandbox code on Linux.
8 #include <linux/seccomp.h>
9 #include <sys/syscall.h>
11 #define DISPLAY(msg) (syscall( SYS_write, 2, msg, strlen(msg) ))
14 system("echo before");
16 if(prctl(PR_SET_SECCOMP
, SECCOMP_MODE_STRICT
) == 0)
17 DISPLAY("SECCOMP Enabled!\n"); else DISPLAY("SECCOMP Fail!\n");
This page took 0.295119 seconds and 5 git commands to generate.