Merge pull request #63 from mansukim1125/seccomp_signal31

fix: always occur signal 31 when executing C-based program
This commit is contained in:
LiYang 2022-01-20 12:21:08 +08:00 committed by GitHub
commit 016653cedb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;