| 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 |
| 205 TargetCreateThread64(LPSECURITY_ATTRIBUTES thread_attributes, |
| 206 SIZE_T stack_size, |
| 207 LPTHREAD_START_ROUTINE start_address, |
| 208 PVOID parameter, |
| 209 DWORD creation_flags, |
| 210 LPDWORD thread_id) { |
| 211 CreateThreadFunction orig_fn = |
| 212 reinterpret_cast<CreateThreadFunction>(g_originals[CREATE_THREAD_ID]); |
| 213 return TargetCreateThread(orig_fn, thread_attributes, stack_size, |
| 214 start_address, parameter, creation_flags, |
| 215 thread_id); |
| 216 } |
| 217 |
| 204 // ----------------------------------------------------------------------- | 218 // ----------------------------------------------------------------------- |
| 205 | 219 |
| 206 SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtCreateKey64( | 220 SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtCreateKey64( |
| 207 PHANDLE key, ACCESS_MASK desired_access, | 221 PHANDLE key, ACCESS_MASK desired_access, |
| 208 POBJECT_ATTRIBUTES object_attributes, ULONG title_index, | 222 POBJECT_ATTRIBUTES object_attributes, ULONG title_index, |
| 209 PUNICODE_STRING class_name, ULONG create_options, PULONG disposition) { | 223 PUNICODE_STRING class_name, ULONG create_options, PULONG disposition) { |
| 210 NtCreateKeyFunction orig_fn = reinterpret_cast< | 224 NtCreateKeyFunction orig_fn = reinterpret_cast< |
| 211 NtCreateKeyFunction>(g_originals[CREATE_KEY_ID]); | 225 NtCreateKeyFunction>(g_originals[CREATE_KEY_ID]); |
| 212 return TargetNtCreateKey(orig_fn, key, desired_access, object_attributes, | 226 return TargetNtCreateKey(orig_fn, key, desired_access, object_attributes, |
| 213 title_index, class_name, create_options, | 227 title_index, class_name, create_options, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 } | 283 } |
| 270 | 284 |
| 271 SANDBOX_INTERCEPT ATOM WINAPI TargetRegisterClassW64( | 285 SANDBOX_INTERCEPT ATOM WINAPI TargetRegisterClassW64( |
| 272 const WNDCLASS* wnd_class) { | 286 const WNDCLASS* wnd_class) { |
| 273 RegisterClassWFunction orig_fn = reinterpret_cast< | 287 RegisterClassWFunction orig_fn = reinterpret_cast< |
| 274 RegisterClassWFunction>(g_originals[REGISTERCLASSW_ID]); | 288 RegisterClassWFunction>(g_originals[REGISTERCLASSW_ID]); |
| 275 return TargetRegisterClassW(orig_fn, wnd_class); | 289 return TargetRegisterClassW(orig_fn, wnd_class); |
| 276 } | 290 } |
| 277 | 291 |
| 278 } // namespace sandbox | 292 } // namespace sandbox |
| OLD | NEW |