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 #include "sandbox/win/src/interceptors_64.h" | 5 #include "sandbox/win/src/interceptors_64.h" |
6 | 6 |
7 #include "sandbox/win/src/interceptors.h" | 7 #include "sandbox/win/src/interceptors.h" |
8 #include "sandbox/win/src/filesystem_interception.h" | 8 #include "sandbox/win/src/filesystem_interception.h" |
9 #include "sandbox/win/src/named_pipe_interception.h" | 9 #include "sandbox/win/src/named_pipe_interception.h" |
10 #include "sandbox/win/src/policy_target.h" | 10 #include "sandbox/win/src/policy_target.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 LPPROCESS_INFORMATION process_information) { | 194 LPPROCESS_INFORMATION process_information) { |
195 CreateProcessAFunction orig_fn = reinterpret_cast< | 195 CreateProcessAFunction orig_fn = reinterpret_cast< |
196 CreateProcessAFunction>(g_originals[CREATE_PROCESSA_ID]); | 196 CreateProcessAFunction>(g_originals[CREATE_PROCESSA_ID]); |
197 return TargetCreateProcessA(orig_fn, application_name, command_line, | 197 return TargetCreateProcessA(orig_fn, application_name, command_line, |
198 process_attributes, thread_attributes, | 198 process_attributes, thread_attributes, |
199 inherit_handles, flags, environment, | 199 inherit_handles, flags, environment, |
200 current_directory, startup_info, | 200 current_directory, startup_info, |
201 process_information); | 201 process_information); |
202 } | 202 } |
203 | 203 |
| 204 SANDBOX_INTERCEPT HANDLE WINAPI TargetCreateThread64( |
| 205 LPSECURITY_ATTRIBUTES thread_attributes, SIZE_T stack_size, |
| 206 LPTHREAD_START_ROUTINE start_address, PVOID parameter, |
| 207 DWORD creation_flags, LPDWORD thread_id) { |
| 208 CreateThreadFunction orig_fn = reinterpret_cast< |
| 209 CreateThreadFunction>(g_originals[CREATE_THREAD_ID]); |
| 210 return TargetCreateThread(orig_fn, thread_attributes, stack_size, |
| 211 start_address, parameter, creation_flags, thread_id); |
| 212 } |
| 213 |
| 214 |
204 // ----------------------------------------------------------------------- | 215 // ----------------------------------------------------------------------- |
205 | 216 |
206 SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtCreateKey64( | 217 SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtCreateKey64( |
207 PHANDLE key, ACCESS_MASK desired_access, | 218 PHANDLE key, ACCESS_MASK desired_access, |
208 POBJECT_ATTRIBUTES object_attributes, ULONG title_index, | 219 POBJECT_ATTRIBUTES object_attributes, ULONG title_index, |
209 PUNICODE_STRING class_name, ULONG create_options, PULONG disposition) { | 220 PUNICODE_STRING class_name, ULONG create_options, PULONG disposition) { |
210 NtCreateKeyFunction orig_fn = reinterpret_cast< | 221 NtCreateKeyFunction orig_fn = reinterpret_cast< |
211 NtCreateKeyFunction>(g_originals[CREATE_KEY_ID]); | 222 NtCreateKeyFunction>(g_originals[CREATE_KEY_ID]); |
212 return TargetNtCreateKey(orig_fn, key, desired_access, object_attributes, | 223 return TargetNtCreateKey(orig_fn, key, desired_access, object_attributes, |
213 title_index, class_name, create_options, | 224 title_index, class_name, create_options, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 } | 280 } |
270 | 281 |
271 SANDBOX_INTERCEPT ATOM WINAPI TargetRegisterClassW64( | 282 SANDBOX_INTERCEPT ATOM WINAPI TargetRegisterClassW64( |
272 const WNDCLASS* wnd_class) { | 283 const WNDCLASS* wnd_class) { |
273 RegisterClassWFunction orig_fn = reinterpret_cast< | 284 RegisterClassWFunction orig_fn = reinterpret_cast< |
274 RegisterClassWFunction>(g_originals[REGISTERCLASSW_ID]); | 285 RegisterClassWFunction>(g_originals[REGISTERCLASSW_ID]); |
275 return TargetRegisterClassW(orig_fn, wnd_class); | 286 return TargetRegisterClassW(orig_fn, wnd_class); |
276 } | 287 } |
277 | 288 |
278 } // namespace sandbox | 289 } // namespace sandbox |
OLD | NEW |