so let's suppose I have a simple program like that:
#include <seccomp.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
int main(void) {
scmp_filter_ctx ctx;
int ret = 0;
ctx = seccomp_init(SCMP_ACT_ALLOW);
ret |= seccomp_rule_add(ctx, SCMP_ACT_KILL, SCMP_SYS(write), 0);
ret |= seccomp_load(ctx);
if (ret) {
exit(ret);
}
// some more stuff
execve("/bin/sh", NULL, NULL);
}
Is it possible to not inherit the restriction to the execve - spawned process? (We are talking configuration, I do not want to call anything seccomp related anymore before the execve invocation)