mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 15:10:48 +01:00
Do not try to add non-existent syscalls.
This commit is contained in:
parent
4e00625bbe
commit
e9ec0cb550
1 changed files with 4 additions and 2 deletions
|
@ -1187,10 +1187,12 @@ add_noparam_filter(scmp_filter_ctx ctx)
|
|||
|
||||
// add general filters
|
||||
for (i = 0; i < ARRAY_LENGTH(filter_nopar_gen); i++) {
|
||||
if (filter_nopar_gen[i] < 0)
|
||||
continue;
|
||||
rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, filter_nopar_gen[i], 0);
|
||||
if (rc != 0) {
|
||||
log_err(LD_BUG,"(Sandbox) failed to add syscall index %d, "
|
||||
"received libseccomp error %d", i, rc);
|
||||
log_err(LD_BUG,"(Sandbox) failed to add syscall index %d (NR=%d), "
|
||||
"received libseccomp error %d", i, filter_nopar_gen[i], rc);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue