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 SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_H__ | 5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_H__ |
6 #define SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_H__ | 6 #define SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_H__ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stdint.h> |
9 #include <sys/types.h> | |
10 #include <sys/wait.h> | |
11 | 9 |
12 #include <algorithm> | |
13 #include <limits> | |
14 #include <map> | 10 #include <map> |
15 #include <set> | 11 #include <set> |
16 #include <utility> | |
17 #include <vector> | 12 #include <vector> |
18 | 13 |
19 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
20 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
21 #include "sandbox/linux/seccomp-bpf/die.h" | |
22 #include "sandbox/linux/seccomp-bpf/errorcode.h" | 16 #include "sandbox/linux/seccomp-bpf/errorcode.h" |
23 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h" | |
24 #include "sandbox/linux/seccomp-bpf/trap.h" | 17 #include "sandbox/linux/seccomp-bpf/trap.h" |
25 #include "sandbox/sandbox_export.h" | 18 #include "sandbox/sandbox_export.h" |
26 | 19 |
| 20 struct sock_filter; |
| 21 |
27 namespace sandbox { | 22 namespace sandbox { |
28 | |
29 class CodeGen; | 23 class CodeGen; |
30 class SandboxBPFPolicy; | 24 class SandboxBPFPolicy; |
31 class SandboxUnittestHelper; | 25 class SandboxUnittestHelper; |
32 struct Instruction; | 26 struct Instruction; |
33 | 27 |
34 class SANDBOX_EXPORT SandboxBPF { | 28 class SANDBOX_EXPORT SandboxBPF { |
35 public: | 29 public: |
36 enum SandboxStatus { | 30 enum SandboxStatus { |
37 STATUS_UNKNOWN, // Status prior to calling supportsSeccompSandbox() | 31 STATUS_UNKNOWN, // Status prior to calling supportsSeccompSandbox() |
38 STATUS_UNSUPPORTED, // The kernel does not appear to support sandboxing | 32 STATUS_UNSUPPORTED, // The kernel does not appear to support sandboxing |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 scoped_ptr<const SandboxBPFPolicy> policy_; | 303 scoped_ptr<const SandboxBPFPolicy> policy_; |
310 Conds* conds_; | 304 Conds* conds_; |
311 bool sandbox_has_started_; | 305 bool sandbox_has_started_; |
312 | 306 |
313 DISALLOW_COPY_AND_ASSIGN(SandboxBPF); | 307 DISALLOW_COPY_AND_ASSIGN(SandboxBPF); |
314 }; | 308 }; |
315 | 309 |
316 } // namespace sandbox | 310 } // namespace sandbox |
317 | 311 |
318 #endif // SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_H__ | 312 #endif // SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_H__ |
OLD | NEW |