feat: add rust support
This commit is contained in:
parent
aaac2d1527
commit
e0033f40af
20
rules/lang_rust.c
Normal file
20
rules/lang_rust.c
Normal file
@ -0,0 +1,20 @@
|
||||
#include "rules.h"
|
||||
|
||||
#include <seccomp.h>
|
||||
|
||||
void setup_lang_rust(scmp_filter_ctx ctx) {
|
||||
int white[] = {
|
||||
SCMP_SYS(poll), // 7
|
||||
SCMP_SYS(rt_sigaction), // 13
|
||||
SCMP_SYS(sigaltstack), // 131
|
||||
SCMP_SYS(sched_getaffinity), // 204
|
||||
};
|
||||
ADD_RULE_LIST(white, SCMP_ACT_ALLOW);
|
||||
}
|
||||
|
||||
struct rule lang_rust_rule = {
|
||||
.name = "rust",
|
||||
.setup = setup_lang_rust,
|
||||
};
|
||||
|
||||
void __attribute__((constructor(101))) register_lang_rust(void) { register_rule(&lang_rust_rule); }
|
Loading…
Reference in New Issue
Block a user