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

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

Issue 318603003: Sandbox policy and intercepts for the MITIGATION_WIN32K_DISABLE policy for renderer processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months 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
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"
11 #include "sandbox/win/src/process_mitigations_win32k_interception.h"
11 #include "sandbox/win/src/process_thread_interception.h" 12 #include "sandbox/win/src/process_thread_interception.h"
12 #include "sandbox/win/src/registry_interception.h" 13 #include "sandbox/win/src/registry_interception.h"
13 #include "sandbox/win/src/sandbox_nt_types.h" 14 #include "sandbox/win/src/sandbox_nt_types.h"
14 #include "sandbox/win/src/sandbox_types.h" 15 #include "sandbox/win/src/sandbox_types.h"
15 #include "sandbox/win/src/sync_interception.h" 16 #include "sandbox/win/src/sync_interception.h"
16 #include "sandbox/win/src/target_interceptions.h" 17 #include "sandbox/win/src/target_interceptions.h"
17 18
18 namespace sandbox { 19 namespace sandbox {
19 20
20 SANDBOX_INTERCEPT NtExports g_nt; 21 SANDBOX_INTERCEPT NtExports g_nt;
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 262
262 SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtOpenEvent64( 263 SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtOpenEvent64(
263 PHANDLE event_handle, ACCESS_MASK desired_access, 264 PHANDLE event_handle, ACCESS_MASK desired_access,
264 POBJECT_ATTRIBUTES object_attributes) { 265 POBJECT_ATTRIBUTES object_attributes) {
265 NtOpenEventFunction orig_fn = reinterpret_cast< 266 NtOpenEventFunction orig_fn = reinterpret_cast<
266 NtOpenEventFunction>(g_originals[OPEN_EVENT_ID]); 267 NtOpenEventFunction>(g_originals[OPEN_EVENT_ID]);
267 return TargetNtOpenEvent(orig_fn, event_handle, desired_access, 268 return TargetNtOpenEvent(orig_fn, event_handle, desired_access,
268 object_attributes); 269 object_attributes);
269 } 270 }
270 271
272 // -----------------------------------------------------------------------
273
274 SANDBOX_INTERCEPT BOOL WINAPI TargetGdiDllInitialize64(
275 HANDLE dll,
276 DWORD reason) {
277 GdiDllInitializeFunction orig_fn = reinterpret_cast<
278 GdiDllInitializeFunction>(g_originals[GDIINITIALIZE_ID]);
279 return TargetGdiDllInitialize(orig_fn, dll, reason);
280 }
281
282 SANDBOX_INTERCEPT HGDIOBJ WINAPI TargetGetStockObject64(int object) {
283 GetStockObjectFunction orig_fn = reinterpret_cast<
284 GetStockObjectFunction>(g_originals[GETSTOCKOBJECT_ID]);
285 return TargetGetStockObject(orig_fn, object);
286 }
287
288 SANDBOX_INTERCEPT ATOM WINAPI TargetRegisterClassW64(
289 const WNDCLASS* wnd_class) {
290 RegisterClassWFunction orig_fn = reinterpret_cast<
291 RegisterClassWFunction>(g_originals[REGISTERCLASSW_ID]);
292 return TargetRegisterClassW(orig_fn, wnd_class);
293 }
294
271 } // namespace sandbox 295 } // namespace sandbox
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698