| 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 <endian.h> | 8 #include <endian.h> | 
| 9 #include <errno.h> | 9 #include <errno.h> | 
| 10 #include <fcntl.h> | 10 #include <fcntl.h> | 
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 78 #define AUDIT_ARCH_ARM    (EM_ARM|__AUDIT_ARCH_LE) | 78 #define AUDIT_ARCH_ARM    (EM_ARM|__AUDIT_ARCH_LE) | 
| 79 #endif | 79 #endif | 
| 80 #ifndef AUDIT_ARCH_I386 | 80 #ifndef AUDIT_ARCH_I386 | 
| 81 #define AUDIT_ARCH_I386   (EM_386|__AUDIT_ARCH_LE) | 81 #define AUDIT_ARCH_I386   (EM_386|__AUDIT_ARCH_LE) | 
| 82 #endif | 82 #endif | 
| 83 #ifndef AUDIT_ARCH_X86_64 | 83 #ifndef AUDIT_ARCH_X86_64 | 
| 84 #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 84 #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 
| 85 #endif | 85 #endif | 
| 86 | 86 | 
| 87 // For prctl.h | 87 // For prctl.h | 
|  | 88 #ifndef PR_SET_SECCOMP | 
|  | 89 #define PR_SET_SECCOMP               22 | 
|  | 90 #define PR_GET_SECCOMP               21 | 
|  | 91 #endif | 
| 88 #ifndef PR_SET_NO_NEW_PRIVS | 92 #ifndef PR_SET_NO_NEW_PRIVS | 
| 89 #define PR_SET_NO_NEW_PRIVS          38 | 93 #define PR_SET_NO_NEW_PRIVS          38 | 
| 90 #define PR_GET_NO_NEW_PRIVS          39 | 94 #define PR_GET_NO_NEW_PRIVS          39 | 
| 91 #endif | 95 #endif | 
| 92 #ifndef IPC_64 | 96 #ifndef IPC_64 | 
| 93 #define IPC_64                   0x0100 | 97 #define IPC_64                   0x0100 | 
| 94 #endif | 98 #endif | 
| 95 | 99 | 
| 96 // In order to build will older tool chains, we currently have to avoid | 100 // In order to build will older tool chains, we currently have to avoid | 
| 97 // including <linux/seccomp.h>. Until that can be fixed (if ever). Rely on | 101 // including <linux/seccomp.h>. Until that can be fixed (if ever). Rely on | 
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 477   static size_t        trap_array_size_; | 481   static size_t        trap_array_size_; | 
| 478   static bool          has_unsafe_traps_; | 482   static bool          has_unsafe_traps_; | 
| 479   static Conds         conds_; | 483   static Conds         conds_; | 
| 480 | 484 | 
| 481   DISALLOW_IMPLICIT_CONSTRUCTORS(Sandbox); | 485   DISALLOW_IMPLICIT_CONSTRUCTORS(Sandbox); | 
| 482 }; | 486 }; | 
| 483 | 487 | 
| 484 }  // namespace | 488 }  // namespace | 
| 485 | 489 | 
| 486 #endif  // SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_H__ | 490 #endif  // SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_H__ | 
| OLD | NEW | 
|---|