#include "rules.h" #include void setup_lang_python(scmp_filter_ctx ctx) { int white[] = { SCMP_SYS(rt_sigaction), // 13 SCMP_SYS(rt_sigprocmask), // 14 SCMP_SYS(ioctl), // 16 SCMP_SYS(dup), // 32 SCMP_SYS(fcntl), // 72 SCMP_SYS(getcwd), // 79 SCMP_SYS(readlink), // 89 SCMP_SYS(sysinfo), // 99 SCMP_SYS(getuid), // 102 SCMP_SYS(getgid), // 104 SCMP_SYS(geteuid), // 107 SCMP_SYS(getegid), // 108 SCMP_SYS(gettid), // 186 SCMP_SYS(futex), // 202 SCMP_SYS(getdents64), // 217 SCMP_SYS(set_tid_address), // 218 SCMP_SYS(pselect6), // 270 SCMP_SYS(set_robust_list), // 273 SCMP_SYS(rseq), // 334 }; ADD_RULE_LIST(white, SCMP_ACT_ALLOW); } struct rule lang_python_rule = { .name = "python3", .setup = setup_lang_python, }; void __attribute__((constructor(101))) register_lang_python(void) { register_rule(&lang_python_rule); }