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); |