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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 MitigationFlags GetDelayedProcessMitigations() const override; | 60 MitigationFlags GetDelayedProcessMitigations() const override; |
61 void SetStrictInterceptions() override; | 61 void SetStrictInterceptions() override; |
62 ResultCode SetStdoutHandle(HANDLE handle) override; | 62 ResultCode SetStdoutHandle(HANDLE handle) override; |
63 ResultCode SetStderrHandle(HANDLE handle) override; | 63 ResultCode SetStderrHandle(HANDLE handle) override; |
64 ResultCode AddRule(SubSystem subsystem, | 64 ResultCode AddRule(SubSystem subsystem, |
65 Semantics semantics, | 65 Semantics semantics, |
66 const wchar_t* pattern) override; | 66 const wchar_t* pattern) override; |
67 ResultCode AddDllToUnload(const wchar_t* dll_name) override; | 67 ResultCode AddDllToUnload(const wchar_t* dll_name) override; |
68 ResultCode AddKernelObjectToClose(const base::char16* handle_type, | 68 ResultCode AddKernelObjectToClose(const base::char16* handle_type, |
69 const base::char16* handle_name) override; | 69 const base::char16* handle_name) override; |
| 70 void AddHandleToShare(HANDLE handle) override; |
| 71 HandleList GetHandlesBeingShared() override; |
70 | 72 |
71 // Dispatcher: | 73 // Dispatcher: |
72 Dispatcher* OnMessageReady(IPCParams* ipc, | 74 Dispatcher* OnMessageReady(IPCParams* ipc, |
73 CallbackGeneric* callback) override; | 75 CallbackGeneric* callback) override; |
74 bool SetupService(InterceptionManager* manager, int service) override; | 76 bool SetupService(InterceptionManager* manager, int service) override; |
75 | 77 |
76 // Creates a Job object with the level specified in a previous call to | 78 // Creates a Job object with the level specified in a previous call to |
77 // SetJobLevel(). | 79 // SetJobLevel(). |
78 ResultCode MakeJobObject(HANDLE* job); | 80 ResultCode MakeJobObject(HANDLE* job); |
79 | 81 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // given type. | 158 // given type. |
157 HandleCloser handle_closer_; | 159 HandleCloser handle_closer_; |
158 std::vector<base::string16> capabilities_; | 160 std::vector<base::string16> capabilities_; |
159 scoped_ptr<AppContainerAttributes> appcontainer_list_; | 161 scoped_ptr<AppContainerAttributes> appcontainer_list_; |
160 PSID lowbox_sid_; | 162 PSID lowbox_sid_; |
161 | 163 |
162 static HDESK alternate_desktop_handle_; | 164 static HDESK alternate_desktop_handle_; |
163 static HWINSTA alternate_winstation_handle_; | 165 static HWINSTA alternate_winstation_handle_; |
164 static IntegrityLevel alternate_desktop_integrity_level_label_; | 166 static IntegrityLevel alternate_desktop_integrity_level_label_; |
165 | 167 |
| 168 // Contains the list of handles being shared with the target process. |
| 169 // This list contains handles other than the stderr/stdout handles which are |
| 170 // shared with the target at times. |
| 171 std::vector<HANDLE> handles_to_share_; |
| 172 |
166 DISALLOW_COPY_AND_ASSIGN(PolicyBase); | 173 DISALLOW_COPY_AND_ASSIGN(PolicyBase); |
167 }; | 174 }; |
168 | 175 |
169 } // namespace sandbox | 176 } // namespace sandbox |
170 | 177 |
171 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ | 178 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ |
OLD | NEW |