Merge c5c4fb3182 into merged_master (Bitcoin PR bitcoin/bitcoin#24758)

This commit is contained in:
James Dorfman 2024-07-29 16:46:56 +00:00
commit 847807539e
5 changed files with 6 additions and 9 deletions

View file

@ -848,7 +848,7 @@ bool AppInitBasicSetup(const ArgsManager& args)
return true;
}
bool AppInitParameterInteraction(const ArgsManager& args)
bool AppInitParameterInteraction(const ArgsManager& args, bool use_syscall_sandbox)
{
const CChainParams& chainparams = Params();
// ********************************************************* Step 2: parameter interactions
@ -1131,6 +1131,9 @@ bool AppInitParameterInteraction(const ArgsManager& args)
if (!SetupSyscallSandbox(log_syscall_violation_before_terminating)) {
return InitError(Untranslated("Installation of the syscall sandbox failed."));
}
if (use_syscall_sandbox) {
SetSyscallSandboxPolicy(SyscallSandboxPolicy::INITIALIZATION);
}
LogPrintf("Experimental syscall sandbox enabled (-sandbox=%s): bitcoind will terminate if an unexpected (not allowlisted) syscall is invoked.\n", sandbox_arg);
}
#endif // USE_SYSCALL_SANDBOX