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/macros.h" |
9 #include "base/process/process_handle.h" | |
10 #include "sandbox/sandbox_export.h" | 9 #include "sandbox/sandbox_export.h" |
11 | 10 |
12 namespace sandbox { | 11 namespace sandbox { |
13 | 12 |
14 // Yama is a LSM kernel module which can restrict ptrace(). | 13 // Yama is a LSM kernel module which can restrict ptrace(). |
15 // This class provides ways to detect if Yama is present and enabled | 14 // This class provides ways to detect if Yama is present and enabled |
16 // and to restrict which processes can ptrace the current process. | 15 // and to restrict which processes can ptrace the current process. |
17 class SANDBOX_EXPORT Yama { | 16 class SANDBOX_EXPORT Yama { |
18 public: | 17 public: |
19 // This enum should be used to set or check a bitmask. | 18 // This enum should be used to set or check a bitmask. |
(...skipping 29 matching lines...) Expand all Loading... |
49 // Helper for checkking for STATUS_ENFORCING in GetStatus(). | 48 // Helper for checkking for STATUS_ENFORCING in GetStatus(). |
50 static bool IsEnforcing(); | 49 static bool IsEnforcing(); |
51 | 50 |
52 private: | 51 private: |
53 DISALLOW_IMPLICIT_CONSTRUCTORS(Yama); | 52 DISALLOW_IMPLICIT_CONSTRUCTORS(Yama); |
54 }; | 53 }; |
55 | 54 |
56 } // namespace sandbox | 55 } // namespace sandbox |
57 | 56 |
58 #endif // SANDBOX_LINUX_SERVICES_YAMA_H_ | 57 #endif // SANDBOX_LINUX_SERVICES_YAMA_H_ |
OLD | NEW |