add extra syscalls to enable glibc init

This commit is contained in:
virusdefender 2016-01-20 15:25:48 +08:00
parent 3457a6c72a
commit 90856dc24f

View File

@ -33,8 +33,10 @@ int run(struct config *config, struct result *result) {
int return_code;
int i;
int syscalls_whitelist[] = {SCMP_SYS(read), SCMP_SYS(write), SCMP_SYS(fstat),
SCMP_SYS(mmap), SCMP_SYS(mprotect), SCMP_SYS(munmap),
SCMP_SYS(brk), SCMP_SYS(access), SCMP_SYS(exit_group)};
SCMP_SYS(mmap), SCMP_SYS(mprotect), SCMP_SYS(munmap),
SCMP_SYS(open), SCMP_SYS(arch_prctl), SCMP_SYS(brk),
SCMP_SYS(access), SCMP_SYS(exit_group), SCMP_SYS(execve),
SCMP_SYS(close)};
int syscalls_whitelist_length = sizeof(syscalls_whitelist) / sizeof(int);
scmp_filter_ctx ctx = NULL;