1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| __int64 sandbox() { __int64 v1; v1 = seccomp_init(0LL); if ( !v1 ) { puts("seccomp error"); exit(0); } seccomp_rule_add(v1, 0x7FFF0000LL, 2LL, 0LL); seccomp_rule_add(v1, 0x7FFF0000LL, 0LL, 0LL); seccomp_rule_add(v1, 0x7FFF0000LL, 1LL, 0LL); seccomp_rule_add(v1, 0x7FFF0000LL, 60LL, 0LL); seccomp_rule_add(v1, 0x7FFF0000LL, 231LL, 0LL);
if ( seccomp_load(v1) < 0 ) { seccomp_release(v1); puts("seccomp error"); exit(0); } return seccomp_release(v1); }
|