| 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 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 CREATEOPMPROTECTEDOUTPUTS_ID, 24)) { | 186 CREATEOPMPROTECTEDOUTPUTS_ID, 24)) { |
| 187 return false; | 187 return false; |
| 188 } | 188 } |
| 189 return true; | 189 return true; |
| 190 | 190 |
| 191 case IPC_GDI_GETCERTIFICATE_TAG: | 191 case IPC_GDI_GETCERTIFICATE_TAG: |
| 192 if (!INTERCEPT_EAT(manager, L"gdi32.dll", GetCertificate, | 192 if (!INTERCEPT_EAT(manager, L"gdi32.dll", GetCertificate, |
| 193 GETCERTIFICATE_ID, 20)) { | 193 GETCERTIFICATE_ID, 20)) { |
| 194 return false; | 194 return false; |
| 195 } | 195 } |
| 196 if (base::win::GetVersion() < base::win::VERSION_WIN10) | 196 if (base::win::GetVersion() < base::win::VERSION_WIN10_TH2) |
| 197 return true; | 197 return true; |
| 198 if (!INTERCEPT_EAT(manager, L"gdi32.dll", GetCertificateByHandle, | 198 if (!INTERCEPT_EAT(manager, L"gdi32.dll", GetCertificateByHandle, |
| 199 GETCERTIFICATEBYHANDLE_ID, 20)) { | 199 GETCERTIFICATEBYHANDLE_ID, 20)) { |
| 200 return false; | 200 return false; |
| 201 } | 201 } |
| 202 return true; | 202 return true; |
| 203 | 203 |
| 204 case IPC_GDI_GETCERTIFICATESIZE_TAG: | 204 case IPC_GDI_GETCERTIFICATESIZE_TAG: |
| 205 if (!INTERCEPT_EAT(manager, L"gdi32.dll", GetCertificateSize, | 205 if (!INTERCEPT_EAT(manager, L"gdi32.dll", GetCertificateSize, |
| 206 GETCERTIFICATESIZE_ID, 16)) { | 206 GETCERTIFICATESIZE_ID, 16)) { |
| 207 return false; | 207 return false; |
| 208 } | 208 } |
| 209 if (base::win::GetVersion() < base::win::VERSION_WIN10) | 209 if (base::win::GetVersion() < base::win::VERSION_WIN10_TH2) |
| 210 return true; | 210 return true; |
| 211 if (!INTERCEPT_EAT(manager, L"gdi32.dll", GetCertificateSizeByHandle, | 211 if (!INTERCEPT_EAT(manager, L"gdi32.dll", GetCertificateSizeByHandle, |
| 212 GETCERTIFICATESIZEBYHANDLE_ID, 16)) { | 212 GETCERTIFICATESIZEBYHANDLE_ID, 16)) { |
| 213 return false; | 213 return false; |
| 214 } | 214 } |
| 215 return true; | 215 return true; |
| 216 | 216 |
| 217 case IPC_GDI_DESTROYOPMPROTECTEDOUTPUT_TAG: | 217 case IPC_GDI_DESTROYOPMPROTECTEDOUTPUT_TAG: |
| 218 if (!INTERCEPT_EAT(manager, L"gdi32.dll", DestroyOPMProtectedOutput, | 218 if (!INTERCEPT_EAT(manager, L"gdi32.dll", DestroyOPMProtectedOutput, |
| 219 DESTROYOPMPROTECTEDOUTPUT_ID, 8)) { | 219 DESTROYOPMPROTECTEDOUTPUT_ID, 8)) { |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 if (!status) { | 568 if (!status) { |
| 569 memcpy(buffer.memory(), &requested_info, | 569 memcpy(buffer.memory(), &requested_info, |
| 570 sizeof(DXGKMDT_OPM_REQUESTED_INFORMATION)); | 570 sizeof(DXGKMDT_OPM_REQUESTED_INFORMATION)); |
| 571 } | 571 } |
| 572 ipc->return_info.nt_status = status; | 572 ipc->return_info.nt_status = status; |
| 573 return true; | 573 return true; |
| 574 } | 574 } |
| 575 | 575 |
| 576 } // namespace sandbox | 576 } // namespace sandbox |
| 577 | 577 |
| OLD | NEW |