| OLD | NEW |
| 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 "services/shell/runner/host/linux_sandbox.h" | 5 #include "services/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 10 matching lines...) Expand all Loading... |
| 21 #include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h" | 21 #include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h" |
| 22 #include "sandbox/linux/seccomp-bpf-helpers/syscall_sets.h" | 22 #include "sandbox/linux/seccomp-bpf-helpers/syscall_sets.h" |
| 23 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | 23 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
| 24 #include "sandbox/linux/services/credentials.h" | 24 #include "sandbox/linux/services/credentials.h" |
| 25 #include "sandbox/linux/services/namespace_sandbox.h" | 25 #include "sandbox/linux/services/namespace_sandbox.h" |
| 26 #include "sandbox/linux/services/proc_util.h" | 26 #include "sandbox/linux/services/proc_util.h" |
| 27 #include "sandbox/linux/services/thread_helpers.h" | 27 #include "sandbox/linux/services/thread_helpers.h" |
| 28 | 28 |
| 29 using sandbox::syscall_broker::BrokerFilePermission; | 29 using sandbox::syscall_broker::BrokerFilePermission; |
| 30 | 30 |
| 31 namespace mojo { | |
| 32 namespace shell { | 31 namespace shell { |
| 33 | 32 |
| 34 namespace { | 33 namespace { |
| 35 | 34 |
| 36 intptr_t SandboxSIGSYSHandler(const struct sandbox::arch_seccomp_data& args, | 35 intptr_t SandboxSIGSYSHandler(const struct sandbox::arch_seccomp_data& args, |
| 37 void* aux) { | 36 void* aux) { |
| 38 RAW_CHECK(aux); | 37 RAW_CHECK(aux); |
| 39 const sandbox::syscall_broker::BrokerProcess* broker_process = | 38 const sandbox::syscall_broker::BrokerProcess* broker_process = |
| 40 static_cast<const sandbox::syscall_broker::BrokerProcess*>(aux); | 39 static_cast<const sandbox::syscall_broker::BrokerProcess*>(aux); |
| 41 switch (args.nr) { | 40 switch (args.nr) { |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 sandbox::syscall_broker::BrokerProcess* leaked_broker = broker_.release(); | 158 sandbox::syscall_broker::BrokerProcess* leaked_broker = broker_.release(); |
| 160 ALLOW_UNUSED_LOCAL(leaked_broker); | 159 ALLOW_UNUSED_LOCAL(leaked_broker); |
| 161 ANNOTATE_LEAKING_OBJECT_PTR(leaked_broker); | 160 ANNOTATE_LEAKING_OBJECT_PTR(leaked_broker); |
| 162 } | 161 } |
| 163 | 162 |
| 164 void LinuxSandbox::Seal() { | 163 void LinuxSandbox::Seal() { |
| 165 proc_fd_.reset(); | 164 proc_fd_.reset(); |
| 166 } | 165 } |
| 167 | 166 |
| 168 } // namespace shell | 167 } // namespace shell |
| 169 } // namespace mojo | |
| OLD | NEW |