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

Side by Side Diff: sandbox/win/src/process_mitigations_win32k_interception.h

Issue 333773005: Intercept the user32!SystemParametersInfoW API in the win32k user gdi lockdown mode (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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SRC_PROCESS_MITIGATIONS_WIN32K_INTERCEPTION_H_ 5 #ifndef SANDBOX_SRC_PROCESS_MITIGATIONS_WIN32K_INTERCEPTION_H_
6 #define SANDBOX_SRC_PROCESS_MITIGATIONS_WIN32K_INTERCEPTION_H_ 6 #define SANDBOX_SRC_PROCESS_MITIGATIONS_WIN32K_INTERCEPTION_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "sandbox/win/src/sandbox_types.h" 10 #include "sandbox/win/src/sandbox_types.h"
11 11
12 namespace sandbox { 12 namespace sandbox {
13 13
14 extern "C" { 14 extern "C" {
15 15
16 typedef BOOL (WINAPI* GdiDllInitializeFunction) ( 16 typedef BOOL (WINAPI* GdiDllInitializeFunction) (
17 HANDLE dll, 17 HANDLE dll,
18 DWORD reason, 18 DWORD reason,
19 LPVOID reserved); 19 LPVOID reserved);
20 20
21 typedef HGDIOBJ (WINAPI *GetStockObjectFunction) (int object); 21 typedef HGDIOBJ (WINAPI *GetStockObjectFunction) (int object);
22 22
23 typedef ATOM (WINAPI *RegisterClassWFunction) (const WNDCLASS* wnd_class); 23 typedef ATOM (WINAPI *RegisterClassWFunction) (const WNDCLASS* wnd_class);
24 24
25 typedef BOOL (WINAPI* SystemParametersInfoWFunction) (UINT action,
26 UINT ui_param, PVOID value, UINT win_ini);
27
25 // Interceptor for the GdiDllInitialize function. 28 // Interceptor for the GdiDllInitialize function.
26 SANDBOX_INTERCEPT BOOL WINAPI TargetGdiDllInitialize( 29 SANDBOX_INTERCEPT BOOL WINAPI TargetGdiDllInitialize(
27 GdiDllInitializeFunction orig_gdi_dll_initialize, 30 GdiDllInitializeFunction orig_gdi_dll_initialize,
28 HANDLE dll, 31 HANDLE dll,
29 DWORD reason); 32 DWORD reason);
30 33
31 // Interceptor for the GetStockObject function. 34 // Interceptor for the GetStockObject function.
32 SANDBOX_INTERCEPT HGDIOBJ WINAPI TargetGetStockObject( 35 SANDBOX_INTERCEPT HGDIOBJ WINAPI TargetGetStockObject(
33 GetStockObjectFunction orig_get_stock_object, 36 GetStockObjectFunction orig_get_stock_object,
34 int object); 37 int object);
35 38
36 // Interceptor for the RegisterClassW function. 39 // Interceptor for the RegisterClassW function.
37 SANDBOX_INTERCEPT ATOM WINAPI TargetRegisterClassW( 40 SANDBOX_INTERCEPT ATOM WINAPI TargetRegisterClassW(
38 RegisterClassWFunction orig_register_class_function, 41 RegisterClassWFunction orig_register_class_function,
39 const WNDCLASS* wnd_class); 42 const WNDCLASS* wnd_class);
40 43
44 // Interceptor for the SystemParametersInfoW function.
45 SANDBOX_INTERCEPT BOOL WINAPI TargetSystemParametersInfoW(
46 SystemParametersInfoWFunction orig_system_parameters_info,
47 UINT action,
48 UINT ui_param,
49 PVOID value,
50 UINT win_ini);
51
41 } // extern "C" 52 } // extern "C"
42 53
43 } // namespace sandbox 54 } // namespace sandbox
44 55
45 #endif // SANDBOX_SRC_PROCESS_MITIGATIONS_WIN32K_INTERCEPTION_H_ 56 #endif // SANDBOX_SRC_PROCESS_MITIGATIONS_WIN32K_INTERCEPTION_H_
46 57
OLDNEW
« no previous file with comments | « sandbox/win/src/process_mitigations_win32k_dispatcher.cc ('k') | sandbox/win/src/process_mitigations_win32k_interception.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698