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

Side by Side Diff: mojo/shell/runner/host/linux_sandbox.cc

Issue 1738663002: Hook embedded shell up to MojoShellConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « mojo/shell/runner/host/BUILD.gn ('k') | mojo/shell/runner/host/native_application_support.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/shell/runner/host/linux_sandbox.h" 5 #include "mojo/shell/runner/host/linux_sandbox.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <sys/syscall.h> 8 #include <sys/syscall.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 case __NR_ftruncate: 87 case __NR_ftruncate:
88 #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) 88 #if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
89 // Per #ifdefs in 89 // Per #ifdefs in
90 // content/common/sandbox_linux/bpf_renderer_policy_linux.cc 90 // content/common/sandbox_linux/bpf_renderer_policy_linux.cc
91 case __NR_getrlimit: 91 case __NR_getrlimit:
92 #endif 92 #endif
93 #if defined(__i386__) || defined(__arm__) 93 #if defined(__i386__) || defined(__arm__)
94 case __NR_ugetrlimit: 94 case __NR_ugetrlimit:
95 #endif 95 #endif
96 case __NR_uname: 96 case __NR_uname:
97 #if defined(__arm__) || defined(__x86_64__) || defined(__mips__)
97 case __NR_getsockopt: 98 case __NR_getsockopt:
98 case __NR_setsockopt: 99 case __NR_setsockopt:
100 #endif
99 return sandbox::bpf_dsl::Allow(); 101 return sandbox::bpf_dsl::Allow();
100 } 102 }
101 103
102 return BaselinePolicy::EvaluateSyscall(sysno); 104 return BaselinePolicy::EvaluateSyscall(sysno);
103 } 105 }
104 106
105 private: 107 private:
106 // Not owned. 108 // Not owned.
107 const sandbox::syscall_broker::BrokerProcess* broker_process_; 109 const sandbox::syscall_broker::BrokerProcess* broker_process_;
108 DISALLOW_COPY_AND_ASSIGN(SandboxPolicy); 110 DISALLOW_COPY_AND_ASSIGN(SandboxPolicy);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 ALLOW_UNUSED_LOCAL(leaked_broker); 157 ALLOW_UNUSED_LOCAL(leaked_broker);
156 ANNOTATE_LEAKING_OBJECT_PTR(leaked_broker); 158 ANNOTATE_LEAKING_OBJECT_PTR(leaked_broker);
157 } 159 }
158 160
159 void LinuxSandbox::Seal() { 161 void LinuxSandbox::Seal() {
160 proc_fd_.reset(); 162 proc_fd_.reset();
161 } 163 }
162 164
163 } // namespace shell 165 } // namespace shell
164 } // namespace mojo 166 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/runner/host/BUILD.gn ('k') | mojo/shell/runner/host/native_application_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698