#include "sandbox/linux/syscall_broker/broker_process.h"
#include <fcntl.h>
#include <signal.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <algorithm>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/files/file_util.h"
#include "base/functional/callback.h"
#include "base/logging.h"
#include "base/posix/eintr_wrapper.h"
#include "base/process/process_metrics.h"
#include "build/build_config.h"
#include "sandbox/linux/syscall_broker/broker_channel.h"
#include "sandbox/linux/syscall_broker/broker_client.h"
#include "sandbox/linux/syscall_broker/broker_command.h"
#include "sandbox/linux/syscall_broker/broker_host.h"
#include "sandbox/linux/syscall_broker/broker_permission_list.h"
#include "sandbox/linux/system_headers/linux_syscalls.h"
namespace sandbox {
namespace syscall_broker {
BrokerProcess::BrokerProcess(std::optional<BrokerSandboxConfig> policy,
BrokerType broker_type,
bool fast_check_in_client,
bool quiet_failures_for_tests)
: … { … }
BrokerProcess::~BrokerProcess() { … }
bool BrokerProcess::ForkSignalBasedBroker(
BrokerSideCallback broker_process_init_callback) { … }
bool BrokerProcess::Fork(BrokerSideCallback broker_process_init_callback) { … }
bool BrokerProcess::IsSyscallAllowed(int sysno) const { … }
bool BrokerProcess::IsSyscallBrokerable(int sysno, bool fast_check) const { … }
void BrokerProcess::CloseChannel() { … }
}
}