#include "sandbox/linux/suid/client/setuid_sandbox_client.h"
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <unistd.h>
#include <string>
#include <utility>
#include "base/environment.h"
#include "base/files/scoped_file.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/posix/eintr_wrapper.h"
#include "base/strings/string_number_conversions.h"
#include "sandbox/linux/suid/common/sandbox.h"
namespace {
bool IsFileSystemAccessDenied() { … }
int GetHelperApi(base::Environment* env) { … }
int EnvToInt(base::Environment* env, const char* var_name) { … }
pid_t GetHelperPID(base::Environment* env) { … }
int GetIPCDescriptor(base::Environment* env) { … }
}
namespace sandbox {
std::unique_ptr<SetuidSandboxClient> SetuidSandboxClient::Create() { … }
SetuidSandboxClient::SetuidSandboxClient(std::unique_ptr<base::Environment> env)
: … { … }
SetuidSandboxClient::~SetuidSandboxClient() = default;
void SetuidSandboxClient::CloseDummyFile() { … }
bool SetuidSandboxClient::ChrootMe() { … }
bool SetuidSandboxClient::IsSuidSandboxUpToDate() const { … }
bool SetuidSandboxClient::IsSuidSandboxChild() const { … }
bool SetuidSandboxClient::IsInNewPIDNamespace() const { … }
bool SetuidSandboxClient::IsInNewNETNamespace() const { … }
bool SetuidSandboxClient::IsSandboxed() const { … }
}