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 
8 enum class SyscallSandboxPolicy {
9  // 1. Initialization
14 
15  // 2. Steady state (non-initialization, non-shutdown)
17  NET,
22  SCHEDULER,
24  TX_INDEX,
26 
27  // 3. Shutdown
28  SHUTOFF,
29 };
30 
45 
46 #if defined(USE_SYSCALL_SANDBOX)
47 [[nodiscard]] bool SetupSyscallSandbox(bool log_syscall_violation_before_terminating);
52 
54 void TestDisallowedSandboxCall();
55 #endif // defined(USE_SYSCALL_SANDBOX)
56 
57 #endif // BITCOIN_UTIL_SYSCALL_SANDBOX_H
SyscallSandboxPolicy::INITIALIZATION_DNS_SEED
@ INITIALIZATION_DNS_SEED
SyscallSandboxPolicy::NET_OPEN_CONNECTION
@ NET_OPEN_CONNECTION
SyscallSandboxPolicy::TOR_CONTROL
@ TOR_CONTROL
SyscallSandboxPolicy::NET_ADD_CONNECTION
@ NET_ADD_CONNECTION
SyscallSandboxPolicy::VALIDATION_SCRIPT_CHECK
@ VALIDATION_SCRIPT_CHECK
SyscallSandboxPolicy::NET_HTTP_SERVER
@ NET_HTTP_SERVER
SetSyscallSandboxPolicy
void SetSyscallSandboxPolicy(SyscallSandboxPolicy syscall_policy)
Force the current thread (and threads created from the current thread) into a restricted-service oper...
Definition: syscall_sandbox.cpp:826
SyscallSandboxPolicy::INITIALIZATION
@ INITIALIZATION
SyscallSandboxPolicy::INITIALIZATION_MAP_PORT
@ INITIALIZATION_MAP_PORT
SyscallSandboxPolicy::SHUTOFF
@ SHUTOFF
SyscallSandboxPolicy
SyscallSandboxPolicy
Definition: syscall_sandbox.h:8
SyscallSandboxPolicy::MESSAGE_HANDLER
@ MESSAGE_HANDLER
SyscallSandboxPolicy::NET_HTTP_SERVER_WORKER
@ NET_HTTP_SERVER_WORKER
SyscallSandboxPolicy::INITIALIZATION_LOAD_BLOCKS
@ INITIALIZATION_LOAD_BLOCKS
SyscallSandboxPolicy::NET
@ NET
SyscallSandboxPolicy::SCHEDULER
@ SCHEDULER
SyscallSandboxPolicy::TX_INDEX
@ TX_INDEX