OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_LINUX_H_ | 5 #ifndef CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_LINUX_H_ |
6 #define CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_LINUX_H_ | 6 #define CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_LINUX_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // this returns what will actually happen once InitializeSandbox() | 66 // this returns what will actually happen once InitializeSandbox() |
67 // is called from inside these processes. | 67 // is called from inside these processes. |
68 int GetStatus(); | 68 int GetStatus(); |
69 // Returns true if the current process is single-threaded or if the number | 69 // Returns true if the current process is single-threaded or if the number |
70 // of threads cannot be determined. | 70 // of threads cannot be determined. |
71 bool IsSingleThreaded() const; | 71 bool IsSingleThreaded() const; |
72 // Did we start Seccomp BPF? | 72 // Did we start Seccomp BPF? |
73 bool seccomp_bpf_started() const; | 73 bool seccomp_bpf_started() const; |
74 | 74 |
75 // Simple accessor for our instance of the setuid sandbox. Will never return | 75 // Simple accessor for our instance of the setuid sandbox. Will never return |
76 // NULL. | 76 // nullptr. |
77 // There is no StartSetuidSandbox(), the SetuidSandboxClient instance should | 77 // There is no StartSetuidSandbox(), the SetuidSandboxClient instance should |
78 // be used directly. | 78 // be used directly. |
79 sandbox::SetuidSandboxClient* setuid_sandbox_client() const; | 79 sandbox::SetuidSandboxClient* setuid_sandbox_client() const; |
80 | 80 |
81 // Check the policy and eventually start the seccomp-bpf sandbox. This should | 81 // Check the policy and eventually start the seccomp-bpf sandbox. This should |
82 // never be called with threads started. If we detect that threads have | 82 // never be called with threads started. If we detect that threads have |
83 // started we will crash. | 83 // started we will crash. |
84 bool StartSeccompBPF(const std::string& process_type); | 84 bool StartSeccompBPF(const std::string& process_type); |
85 | 85 |
86 // Limit the address space of the current process (and its children). | 86 // Limit the address space of the current process (and its children). |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 defined(LEAK_SANITIZER) || defined(UNDEFINED_SANITIZER) | 136 defined(LEAK_SANITIZER) || defined(UNDEFINED_SANITIZER) |
137 scoped_ptr<__sanitizer_sandbox_arguments> sanitizer_args_; | 137 scoped_ptr<__sanitizer_sandbox_arguments> sanitizer_args_; |
138 #endif | 138 #endif |
139 | 139 |
140 DISALLOW_COPY_AND_ASSIGN(LinuxSandbox); | 140 DISALLOW_COPY_AND_ASSIGN(LinuxSandbox); |
141 }; | 141 }; |
142 | 142 |
143 } // namespace content | 143 } // namespace content |
144 | 144 |
145 #endif // CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_LINUX_H_ | 145 #endif // CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_LINUX_H_ |
OLD | NEW |