OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_SRC_REGISTRY_POLICY_H__ | 5 #ifndef SANDBOX_SRC_REGISTRY_POLICY_H__ |
6 #define SANDBOX_SRC_REGISTRY_POLICY_H__ | 6 #define SANDBOX_SRC_REGISTRY_POLICY_H__ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "sandbox/win/src/crosscall_server.h" | 13 #include "sandbox/win/src/crosscall_server.h" |
14 #include "sandbox/win/src/nt_internals.h" | 14 #include "sandbox/win/src/nt_internals.h" |
15 #include "sandbox/win/src/policy_low_level.h" | 15 #include "sandbox/win/src/policy_low_level.h" |
16 #include "sandbox/win/src/sandbox_policy.h" | 16 #include "sandbox/win/src/sandbox_policy.h" |
17 | 17 |
18 namespace sandbox { | 18 namespace sandbox { |
19 | 19 |
20 enum EvalResult; | |
21 | |
22 // This class centralizes most of the knowledge related to registry policy | 20 // This class centralizes most of the knowledge related to registry policy |
23 class RegistryPolicy { | 21 class RegistryPolicy { |
24 public: | 22 public: |
25 // Creates the required low-level policy rules to evaluate a high-level | 23 // Creates the required low-level policy rules to evaluate a high-level |
26 // policy rule for registry IO, in particular open or create actions. | 24 // policy rule for registry IO, in particular open or create actions. |
27 static bool GenerateRules(const wchar_t* name, | 25 static bool GenerateRules(const wchar_t* name, |
28 TargetPolicy::Semantics semantics, | 26 TargetPolicy::Semantics semantics, |
29 LowLevelPolicy* policy); | 27 LowLevelPolicy* policy); |
30 | 28 |
31 // Performs the desired policy action on a create request with an | 29 // Performs the desired policy action on a create request with an |
(...skipping 18 matching lines...) Expand all Loading... |
50 uint32_t attributes, | 48 uint32_t attributes, |
51 HANDLE root_directory, | 49 HANDLE root_directory, |
52 uint32_t desired_access, | 50 uint32_t desired_access, |
53 HANDLE* handle, | 51 HANDLE* handle, |
54 NTSTATUS* nt_status); | 52 NTSTATUS* nt_status); |
55 }; | 53 }; |
56 | 54 |
57 } // namespace sandbox | 55 } // namespace sandbox |
58 | 56 |
59 #endif // SANDBOX_SRC_REGISTRY_POLICY_H__ | 57 #endif // SANDBOX_SRC_REGISTRY_POLICY_H__ |
OLD | NEW |