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

Unified Diff: content/common/sandbox_linux/bpf_utility_policy_linux.cc

Issue 333823002: Apply renderer sandbox to utility processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment artifact Created 6 years, 6 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
Index: content/common/sandbox_linux/bpf_utility_policy_linux.cc
diff --git a/content/common/sandbox_linux/bpf_renderer_policy_linux.cc b/content/common/sandbox_linux/bpf_utility_policy_linux.cc
similarity index 72%
copy from content/common/sandbox_linux/bpf_renderer_policy_linux.cc
copy to content/common/sandbox_linux/bpf_utility_policy_linux.cc
index db5201018071c169ed9921433fa7895df978633a..12207b8ac2ae9b8debee52516dd7ed253ccce244 100644
--- a/content/common/sandbox_linux/bpf_renderer_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_utility_policy_linux.cc
@@ -1,8 +1,8 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 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.
-#include "content/common/sandbox_linux/bpf_renderer_policy_linux.h"
+#include "content/common/sandbox_linux/bpf_utility_policy_linux.h"
#include <errno.h>
@@ -18,11 +18,19 @@ using sandbox::SyscallSets;
namespace content {
-RendererProcessPolicy::RendererProcessPolicy() {}
-RendererProcessPolicy::~RendererProcessPolicy() {}
+UtilityProcessPolicy::UtilityProcessPolicy() {
+}
+UtilityProcessPolicy::~UtilityProcessPolicy() {
+}
+
+ErrorCode UtilityProcessPolicy::EvaluateSyscall(SandboxBPF* sandbox,
+ int sysno) const {
+ // TODO(mdempsky): For now, this is just a copy of the renderer
+ // policy, which happens to work well for utility processes too. It
+ // should be possible to limit further though. In particular, the
+ // entries below annotated with bug references are most likely
+ // unnecessary.
-ErrorCode RendererProcessPolicy::EvaluateSyscall(SandboxBPF* sandbox,
- int sysno) const {
switch (sysno) {
case __NR_ioctl:
return sandbox::RestrictIoctl(sandbox);
« no previous file with comments | « content/common/sandbox_linux/bpf_utility_policy_linux.h ('k') | content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698