Bitcoin Core 22.99.0
P2P Digital Currency
syscall_sandbox.h
Go to the documentation of this file.
1// Copyright (c) 2020 The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_UTIL_SYSCALL_SANDBOX_H
6#define BITCOIN_UTIL_SYSCALL_SANDBOX_H
7
9 // 1. Initialization
14
15 // 2. Steady state (non-initialization, non-shutdown)
17 NET,
26
27 // 3. Shutdown
28 SHUTOFF,
29};
30
45
46#if defined(USE_SYSCALL_SANDBOX)
51[[nodiscard]] bool SetupSyscallSandbox(bool log_syscall_violation_before_terminating);
52
54void TestDisallowedSandboxCall();
55#endif // defined(USE_SYSCALL_SANDBOX)
56
57#endif // BITCOIN_UTIL_SYSCALL_SANDBOX_H
SyscallSandboxPolicy
void SetSyscallSandboxPolicy(SyscallSandboxPolicy syscall_policy)
Force the current thread (and threads created from the current thread) into a restricted-service oper...