Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Unified Diff: mandoline/app/desktop/linux_sandbox.h

Issue 1264463005: mandoline sandbox: prewarm libraries before we raise the sandbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add security checks to LinuxSandbox::Warmup() Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mandoline/app/desktop/BUILD.gn ('k') | mandoline/app/desktop/linux_sandbox.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mandoline/app/desktop/linux_sandbox.h
diff --git a/mandoline/app/desktop/linux_sandbox.h b/mandoline/app/desktop/linux_sandbox.h
deleted file mode 100644
index 82cc084a178d206a17c5351722acafcffb291411..0000000000000000000000000000000000000000
--- a/mandoline/app/desktop/linux_sandbox.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MANDOLINE_APP_DESKTOP_LINUX_SANDBOX_H_
-#define MANDOLINE_APP_DESKTOP_LINUX_SANDBOX_H_
-
-#include "base/files/scoped_file.h"
-#include "sandbox/linux/bpf_dsl/bpf_dsl.h"
-#include "sandbox/linux/bpf_dsl/policy.h"
-#include "sandbox/linux/syscall_broker/broker_process.h"
-
-namespace mandoline {
-
-// Encapsulates all tasks related to raising the sandbox for mandoline.
-class LinuxSandbox {
- public:
- explicit LinuxSandbox(
- const std::vector<sandbox::syscall_broker::BrokerFilePermission>&
- permissions);
- ~LinuxSandbox();
-
- // Returns a vector of file permissions needed to load libraries.
- static std::vector<sandbox::syscall_broker::BrokerFilePermission>
- GetPermissions();
-
- // Grabs a file descriptor to /proc.
- void Warmup();
-
- // Puts the user in a new PID namespace.
- void EngageNamespaceSandbox();
-
- // Starts a broker process and sets up seccomp-bpf to delegate decisions to
- // it.
- void EngageSeccompSandbox();
-
- // Performs the dropping of access to the outside world (drops the reference
- // to /proc acquired in Warmup().
- void Seal();
-
- private:
- bool warmed_up_;
- base::ScopedFD proc_fd_;
- scoped_ptr<sandbox::syscall_broker::BrokerProcess> broker_;
- scoped_ptr<sandbox::bpf_dsl::Policy> policy_;
-
- DISALLOW_COPY_AND_ASSIGN(LinuxSandbox);
-};
-
-} // namespace mandoline
-
-#endif // MANDOLINE_APP_DESKTOP_LINUX_SANDBOX_H_
« no previous file with comments | « mandoline/app/desktop/BUILD.gn ('k') | mandoline/app/desktop/linux_sandbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698