fix: always occur signal 31 when executing C-based program

This commit is contained in:
mansukim1125 2022-01-20 00:59:41 +09:00
parent 57ac33aa43
commit 541d79d7a8

View File

@ -17,7 +17,7 @@ int _c_cpp_seccomp_rules(struct config *_config, bool allow_write_file) {
SCMP_SYS(close), SCMP_SYS(readlink),
SCMP_SYS(sysinfo), SCMP_SYS(write),
SCMP_SYS(writev), SCMP_SYS(lseek),
SCMP_SYS(clock_gettime)};
SCMP_SYS(clock_gettime), SCMP_SYS(pread64)}; // add extra rule for pread64
int syscalls_whitelist_length = sizeof(syscalls_whitelist) / sizeof(int);
scmp_filter_ctx ctx = NULL;