Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(886)

Side by Side Diff: sandbox/win/src/interceptors_64.cc

Issue 41193002: Attempt3 at landing this. The previous attempt failed on Windows XP because the \Sessions\Session i… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sandbox/win/src/interceptors_64.h ('k') | sandbox/win/src/nt_internals.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 PHANDLE key, ACCESS_MASK desired_access, 242 PHANDLE key, ACCESS_MASK desired_access,
243 POBJECT_ATTRIBUTES object_attributes, ULONG open_options) { 243 POBJECT_ATTRIBUTES object_attributes, ULONG open_options) {
244 NtOpenKeyExFunction orig_fn = reinterpret_cast< 244 NtOpenKeyExFunction orig_fn = reinterpret_cast<
245 NtOpenKeyExFunction>(g_originals[OPEN_KEY_EX_ID]); 245 NtOpenKeyExFunction>(g_originals[OPEN_KEY_EX_ID]);
246 return TargetNtOpenKeyEx(orig_fn, key, desired_access, object_attributes, 246 return TargetNtOpenKeyEx(orig_fn, key, desired_access, object_attributes,
247 open_options); 247 open_options);
248 } 248 }
249 249
250 // ----------------------------------------------------------------------- 250 // -----------------------------------------------------------------------
251 251
252 SANDBOX_INTERCEPT HANDLE WINAPI TargetCreateEventW64( 252 SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtCreateEvent64(
253 LPSECURITY_ATTRIBUTES security_attributes, BOOL manual_reset, 253 PHANDLE event_handle, ACCESS_MASK desired_access,
254 BOOL initial_state, LPCWSTR name) { 254 POBJECT_ATTRIBUTES object_attributes, EVENT_TYPE event_type,
255 CreateEventWFunction orig_fn = reinterpret_cast< 255 BOOLEAN initial_state) {
256 CreateEventWFunction>(g_originals[CREATE_EVENTW_ID]); 256 NtCreateEventFunction orig_fn = reinterpret_cast<
257 return TargetCreateEventW(orig_fn, security_attributes, manual_reset, 257 NtCreateEventFunction>(g_originals[CREATE_EVENT_ID]);
258 initial_state, name); 258 return TargetNtCreateEvent(orig_fn, event_handle, desired_access,
259 object_attributes, event_type, initial_state);
259 } 260 }
260 261
261 SANDBOX_INTERCEPT HANDLE WINAPI TargetCreateEventA64( 262 SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtOpenEvent64(
262 LPSECURITY_ATTRIBUTES security_attributes, BOOL manual_reset, 263 PHANDLE event_handle, ACCESS_MASK desired_access,
263 BOOL initial_state, LPCSTR name) { 264 POBJECT_ATTRIBUTES object_attributes) {
264 CreateEventAFunction orig_fn = reinterpret_cast< 265 NtOpenEventFunction orig_fn = reinterpret_cast<
265 CreateEventAFunction>(g_originals[CREATE_EVENTA_ID]); 266 NtOpenEventFunction>(g_originals[OPEN_EVENT_ID]);
266 return TargetCreateEventA(orig_fn, security_attributes, manual_reset, 267 return TargetNtOpenEvent(orig_fn, event_handle, desired_access,
267 initial_state, name); 268 object_attributes);
268 }
269
270 SANDBOX_INTERCEPT HANDLE WINAPI TargetOpenEventW64(
271 DWORD desired_access, BOOL inherit_handle, LPCWSTR name) {
272 OpenEventWFunction orig_fn = reinterpret_cast<
273 OpenEventWFunction>(g_originals[OPEN_EVENTW_ID]);
274 return TargetOpenEventW(orig_fn, desired_access, inherit_handle, name);
275 }
276
277 SANDBOX_INTERCEPT HANDLE WINAPI TargetOpenEventA64(
278 DWORD desired_access, BOOL inherit_handle, LPCSTR name) {
279 OpenEventAFunction orig_fn = reinterpret_cast<
280 OpenEventAFunction>(g_originals[OPEN_EVENTA_ID]);
281 return TargetOpenEventA(orig_fn, desired_access, inherit_handle, name);
282 } 269 }
283 270
284 } // namespace sandbox 271 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/src/interceptors_64.h ('k') | sandbox/win/src/nt_internals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698