| OLD | NEW |
| 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 #include "sandbox/win/src/process_mitigations_win32k_dispatcher.h" | 5 #include "sandbox/win/src/process_mitigations_win32k_dispatcher.h" |
| 6 #include "sandbox/win/src/interception.h" | 6 #include "sandbox/win/src/interception.h" |
| 7 #include "sandbox/win/src/interceptors.h" | 7 #include "sandbox/win/src/interceptors.h" |
| 8 #include "sandbox/win/src/ipc_tags.h" | 8 #include "sandbox/win/src/ipc_tags.h" |
| 9 #include "sandbox/win/src/process_mitigations_win32k_interception.h" | 9 #include "sandbox/win/src/process_mitigations_win32k_interception.h" |
| 10 | 10 |
| 11 namespace sandbox { | 11 namespace sandbox { |
| 12 | 12 |
| 13 ProcessMitigationsWin32KDispatcher::ProcessMitigationsWin32KDispatcher( | 13 ProcessMitigationsWin32KDispatcher::ProcessMitigationsWin32KDispatcher( |
| 14 PolicyBase* policy_base) | 14 TargetPolicy* policy) |
| 15 : policy_base_(policy_base) { | 15 : policy_(policy) {} |
| 16 } | |
| 17 | 16 |
| 18 bool ProcessMitigationsWin32KDispatcher::SetupService( | 17 bool ProcessMitigationsWin32KDispatcher::SetupService( |
| 19 InterceptionManager* manager, int service) { | 18 InterceptionManager* manager, int service) { |
| 20 if (!(policy_base_->GetProcessMitigations() & | 19 if (!(policy_->GetProcessMitigations() & |
| 21 sandbox::MITIGATION_WIN32K_DISABLE)) { | 20 sandbox::MITIGATION_WIN32K_DISABLE)) { |
| 22 return false; | 21 return false; |
| 23 } | 22 } |
| 24 | 23 |
| 25 switch (service) { | 24 switch (service) { |
| 26 case IPC_GDI_GDIDLLINITIALIZE_TAG: { | 25 case IPC_GDI_GDIDLLINITIALIZE_TAG: { |
| 27 if (!INTERCEPT_EAT(manager, L"gdi32.dll", GdiDllInitialize, | 26 if (!INTERCEPT_EAT(manager, L"gdi32.dll", GdiDllInitialize, |
| 28 GDIINITIALIZE_ID, 12)) { | 27 GDIINITIALIZE_ID, 12)) { |
| 29 return false; | 28 return false; |
| 30 } | 29 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 48 } | 47 } |
| 49 | 48 |
| 50 default: | 49 default: |
| 51 break; | 50 break; |
| 52 } | 51 } |
| 53 return false; | 52 return false; |
| 54 } | 53 } |
| 55 | 54 |
| 56 } // namespace sandbox | 55 } // namespace sandbox |
| 57 | 56 |
| OLD | NEW |