mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 15:10:48 +01:00
small open syscall modification (just in case)
This commit is contained in:
parent
bc19ea100c
commit
b10472f92b
1 changed files with 2 additions and 2 deletions
|
@ -126,7 +126,7 @@ static int filter_nopar_gen[] = {
|
||||||
SCMP_SYS(recvfrom),
|
SCMP_SYS(recvfrom),
|
||||||
SCMP_SYS(sendto),
|
SCMP_SYS(sendto),
|
||||||
SCMP_SYS(send),
|
SCMP_SYS(send),
|
||||||
SCMP_SYS(unlink) // ?
|
SCMP_SYS(unlink)
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -264,7 +264,7 @@ sb_open(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
// problem: required by getaddrinfo
|
// problem: required by getaddrinfo
|
||||||
rc = seccomp_rule_add(ctx, SCMP_ACT_ERRNO(1), SCMP_SYS(open), 1,
|
rc = seccomp_rule_add(ctx, SCMP_ACT_ERRNO(-1), SCMP_SYS(open), 1,
|
||||||
SCMP_CMP(1, SCMP_CMP_EQ, O_RDONLY|O_CLOEXEC));
|
SCMP_CMP(1, SCMP_CMP_EQ, O_RDONLY|O_CLOEXEC));
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
log_err(LD_BUG,"(Sandbox) failed to add open syscall, received libseccomp "
|
log_err(LD_BUG,"(Sandbox) failed to add open syscall, received libseccomp "
|
||||||
|
|
Loading…
Add table
Reference in a new issue