OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SERVICES_YAMA_H_ | 5 #ifndef SANDBOX_LINUX_SERVICES_YAMA_H_ |
6 #define SANDBOX_LINUX_SERVICES_YAMA_H_ | 6 #define SANDBOX_LINUX_SERVICES_YAMA_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/process/process_handle.h" | 9 #include "base/process/process_handle.h" |
10 #include "sandbox/sandbox_export.h" | 10 #include "sandbox/sandbox_export.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 // Checks if Yama is currently in enforcing mode for the machine (not the | 42 // Checks if Yama is currently in enforcing mode for the machine (not the |
43 // current process). This requires access to the filesystem and will use | 43 // current process). This requires access to the filesystem and will use |
44 // /proc/sys/kernel/yama/ptrace_scope. | 44 // /proc/sys/kernel/yama/ptrace_scope. |
45 static int GetStatus(); | 45 static int GetStatus(); |
46 | 46 |
47 // Helper for checking for STATUS_PRESENT in GetStatus(). | 47 // Helper for checking for STATUS_PRESENT in GetStatus(). |
48 static bool IsPresent(); | 48 static bool IsPresent(); |
49 // Helper for checkking for STATUS_ENFORCING in GetStatus(). | 49 // Helper for checkking for STATUS_ENFORCING in GetStatus(). |
50 static bool IsEnforcing(); | 50 static bool IsEnforcing(); |
51 | 51 |
52 // Linux 3.2 has a bug with 32bit userspace and 64bit kernels. This function | |
Jorge Lucangeli Obes
2014/07/08 04:14:28
32-bit, 64-bit
| |
53 // returns true if Yama is disabled due to this bug. | |
54 static bool HasLinux32Bug(); | |
55 | |
52 private: | 56 private: |
53 DISALLOW_IMPLICIT_CONSTRUCTORS(Yama); | 57 DISALLOW_IMPLICIT_CONSTRUCTORS(Yama); |
54 }; | 58 }; |
55 | 59 |
56 } // namespace sandbox | 60 } // namespace sandbox |
57 | 61 |
58 #endif // SANDBOX_LINUX_SERVICES_YAMA_H_ | 62 #endif // SANDBOX_LINUX_SERVICES_YAMA_H_ |
OLD | NEW |