process_mitigations_win32k_policy.cc 791 B

123456789101112131415161718192021222324252627
  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
  3. // found in the LICENSE file.
  4. #include "sandbox/win/src/process_mitigations_win32k_policy.h"
  5. #include <stddef.h>
  6. #include "sandbox/win/src/process_mitigations_win32k_interception.h"
  7. namespace sandbox {
  8. bool ProcessMitigationsWin32KLockdownPolicy::GenerateRules(
  9. const wchar_t* name,
  10. Semantics semantics,
  11. LowLevelPolicy* policy) {
  12. PolicyRule rule(FAKE_SUCCESS);
  13. if (!policy->AddRule(IpcTag::GDI_GDIDLLINITIALIZE, &rule))
  14. return false;
  15. if (!policy->AddRule(IpcTag::GDI_GETSTOCKOBJECT, &rule))
  16. return false;
  17. if (!policy->AddRule(IpcTag::USER_REGISTERCLASSW, &rule))
  18. return false;
  19. return true;
  20. }
  21. } // namespace sandbox