SCMP_SYS(sendto),
SCMP_SYS(send),
SCMP_SYS(setsockopt),
+ SCMP_SYS(socket),
SCMP_SYS(socketpair),
SCMP_SYS(recvfrom),
SCMP_SYS(unlink),
#endif
};
- for(i = 0; i < LENGHT(param); i++) {
+ for (i = 0; i < LENGHT(param); i++) {
rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(rt_sigaction), 1,
SCMP_CMP(0, SCMP_CMP_EQ, param[i]));
- if(rc)
+ if (rc)
break;
}
rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(mmap2), 2,
SCMP_CMP(2, SCMP_CMP_EQ, PROT_READ),
SCMP_CMP(3, SCMP_CMP_EQ, MAP_PRIVATE));
- if(rc) {
+ if (rc) {
return rc;
}
rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(mmap2), 2,
SCMP_CMP(2, SCMP_CMP_EQ, PROT_READ|PROT_WRITE),
SCMP_CMP(3, SCMP_CMP_EQ, MAP_PRIVATE|MAP_ANONYMOUS));
- if(rc) {
+ if (rc) {
return rc;
}
int i, rc = 0;
// function pointer
- for(i = 0; i < LENGHT(filter_func); i++) {
+ for (i = 0; i < LENGHT(filter_func); i++) {
if ((filter_func[i])(ctx)) {
log_err(LD_BUG,"(Sandbox) failed to add syscall, received libseccomp "
"error %d", rc);
#endif // USE_LIBSECCOMP
sandbox_cfg_t*
-sandbox_cfg_new() {
+sandbox_cfg_new()
+{
return NULL;
}