Skip to content

Commit 12152bf

Browse files
committed
syscall: whitelist network access for msghand thread
Unlike in Bitcoin, our message handling thread needs to open sockets in order to call out to the mainchain RPC interface. We recently brought in a seccomp syscall whitelist from upstream, which is enabled on my local CI box (though apparently not on Github CI) and it is failing on this.
1 parent ea5d6fd commit 12152bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/util/syscall_sandbox.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,8 @@ void SetSyscallSandboxPolicy(SyscallSandboxPolicy syscall_policy)
867867
break;
868868
case SyscallSandboxPolicy::MESSAGE_HANDLER: // Thread: msghand
869869
seccomp_policy_builder.AllowFileSystem();
870+
// ELEMENTS: Need network to call CallMainChainRPC
871+
seccomp_policy_builder.AllowNetwork();
870872
break;
871873
case SyscallSandboxPolicy::NET: // Thread: net
872874
seccomp_policy_builder.AllowFileSystem();

0 commit comments

Comments
 (0)