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/service_manager/runner/host/linux_sandbox.h" | 5 #include "services/service_manager/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 shell { | 31 namespace service_manager { |
32 | 32 |
33 namespace { | 33 namespace { |
34 | 34 |
35 intptr_t SandboxSIGSYSHandler(const struct sandbox::arch_seccomp_data& args, | 35 intptr_t SandboxSIGSYSHandler(const struct sandbox::arch_seccomp_data& args, |
36 void* aux) { | 36 void* aux) { |
37 RAW_CHECK(aux); | 37 RAW_CHECK(aux); |
38 const sandbox::syscall_broker::BrokerProcess* broker_process = | 38 const sandbox::syscall_broker::BrokerProcess* broker_process = |
39 static_cast<const sandbox::syscall_broker::BrokerProcess*>(aux); | 39 static_cast<const sandbox::syscall_broker::BrokerProcess*>(aux); |
40 switch (args.nr) { | 40 switch (args.nr) { |
41 #if !defined(__aarch64__) | 41 #if !defined(__aarch64__) |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // the process exits or is killed. | 159 // the process exits or is killed. |
160 sandbox::syscall_broker::BrokerProcess* leaked_broker = broker_.release(); | 160 sandbox::syscall_broker::BrokerProcess* leaked_broker = broker_.release(); |
161 ALLOW_UNUSED_LOCAL(leaked_broker); | 161 ALLOW_UNUSED_LOCAL(leaked_broker); |
162 ANNOTATE_LEAKING_OBJECT_PTR(leaked_broker); | 162 ANNOTATE_LEAKING_OBJECT_PTR(leaked_broker); |
163 } | 163 } |
164 | 164 |
165 void LinuxSandbox::Seal() { | 165 void LinuxSandbox::Seal() { |
166 proc_fd_.reset(); | 166 proc_fd_.reset(); |
167 } | 167 } |
168 | 168 |
169 } // namespace shell | 169 } // namespace service_manager |
OLD | NEW |