OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WIN_SRC_SANDBOX_POLICY_BASE_H_ | 5 #ifndef SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ |
6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ | 6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 // Returns a dispatcher from ipc_targets_. | 109 // Returns a dispatcher from ipc_targets_. |
110 Dispatcher* GetDispatcher(int ipc_tag); | 110 Dispatcher* GetDispatcher(int ipc_tag); |
111 | 111 |
112 // Sets up interceptions for a new target. | 112 // Sets up interceptions for a new target. |
113 bool SetupAllInterceptions(TargetProcess* target); | 113 bool SetupAllInterceptions(TargetProcess* target); |
114 | 114 |
115 // Sets up the handle closer for a new target. | 115 // Sets up the handle closer for a new target. |
116 bool SetupHandleCloser(TargetProcess* target); | 116 bool SetupHandleCloser(TargetProcess* target); |
117 | 117 |
| 118 ResultCode AddRuleInternal(SubSystem subsystem, |
| 119 Semantics semantics, |
| 120 const wchar_t* pattern); |
| 121 |
118 // This lock synchronizes operations on the targets_ collection. | 122 // This lock synchronizes operations on the targets_ collection. |
119 CRITICAL_SECTION lock_; | 123 CRITICAL_SECTION lock_; |
120 // Maintains the list of target process associated with this policy. | 124 // Maintains the list of target process associated with this policy. |
121 // The policy takes ownership of them. | 125 // The policy takes ownership of them. |
122 typedef std::list<TargetProcess*> TargetSet; | 126 typedef std::list<TargetProcess*> TargetSet; |
123 TargetSet targets_; | 127 TargetSet targets_; |
124 // Standard object-lifetime reference counter. | 128 // Standard object-lifetime reference counter. |
125 volatile LONG ref_count; | 129 volatile LONG ref_count; |
126 // The user-defined global policy settings. | 130 // The user-defined global policy settings. |
127 TokenLevel lockdown_level_; | 131 TokenLevel lockdown_level_; |
(...skipping 30 matching lines...) Expand all Loading... |
158 static HDESK alternate_desktop_handle_; | 162 static HDESK alternate_desktop_handle_; |
159 static HWINSTA alternate_winstation_handle_; | 163 static HWINSTA alternate_winstation_handle_; |
160 static IntegrityLevel alternate_desktop_integrity_level_label_; | 164 static IntegrityLevel alternate_desktop_integrity_level_label_; |
161 | 165 |
162 DISALLOW_COPY_AND_ASSIGN(PolicyBase); | 166 DISALLOW_COPY_AND_ASSIGN(PolicyBase); |
163 }; | 167 }; |
164 | 168 |
165 } // namespace sandbox | 169 } // namespace sandbox |
166 | 170 |
167 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ | 171 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ |
OLD | NEW |