woj-sandbox/rules/lang_pypy.c
2024-01-30 12:39:55 +08:00

22 lines
531 B
C

#include "rules.h"
#include <seccomp.h>
void setup_lang_pypy(scmp_filter_ctx ctx) {
void setup_lang_python(scmp_filter_ctx ctx);
setup_lang_python(ctx);
int white[] = {
SCMP_SYS(uname), // 63
SCMP_SYS(mkdir), // 83
SCMP_SYS(readlinkat), // 267
};
ADD_RULE_LIST(white, SCMP_ACT_ALLOW);
}
struct rule lang_pypy_rule = {
.name = "pypy3",
.setup = setup_lang_pypy,
};
void __attribute__((constructor(101))) register_lang_pypy(void) { register_rule(&lang_pypy_rule); }