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

Unified Diff: content/public/common/sandbox_init.h

Issue 733303004: Linux sandbox: change API to start the sandbox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits from Jorge. Created 6 years, 1 month 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 | « content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc ('k') | content/zygote/zygote_main_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/sandbox_init.h
diff --git a/content/public/common/sandbox_init.h b/content/public/common/sandbox_init.h
index 4173d9afe4ddedfeeb6273be065efc44bc3b68b5..bf52223b5f2244063420fd5413c4f4f61aa5a0f3 100644
--- a/content/public/common/sandbox_init.h
+++ b/content/public/common/sandbox_init.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_
#define CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_
+#include "base/files/scoped_file.h"
#include "base/memory/scoped_ptr.h"
#include "base/process/process.h"
#include "build/build_config.h"
@@ -86,9 +87,12 @@ CONTENT_EXPORT bool InitializeSandbox(int sandbox_type,
class SandboxInitializerDelegate;
// Initialize a seccomp-bpf sandbox. |policy| may not be NULL.
+// If an existing layer of sandboxing is present that would prevent access to
+// /proc, |proc_task_fd| must be a valid file descriptor to /proc/self/task.
// Returns true if the sandbox has been properly engaged.
CONTENT_EXPORT bool InitializeSandbox(
- scoped_ptr<sandbox::bpf_dsl::Policy> policy);
+ scoped_ptr<sandbox::bpf_dsl::Policy> policy,
+ base::ScopedFD proc_task_fd);
// Return a "baseline" policy. This is used by a SandboxInitializerDelegate to
// implement a policy that is derived from the baseline.
« no previous file with comments | « content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc ('k') | content/zygote/zygote_main_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698