policy_target.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright (c) 2006-2008 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. #ifndef SANDBOX_WIN_SRC_POLICY_TARGET_H_
  5. #define SANDBOX_WIN_SRC_POLICY_TARGET_H_
  6. #include "sandbox/win/src/ipc_tags.h"
  7. #include "sandbox/win/src/nt_internals.h"
  8. #include "sandbox/win/src/sandbox_types.h"
  9. namespace sandbox {
  10. struct CountedParameterSetBase;
  11. // Performs a policy lookup and returns true if the request should be passed to
  12. // the broker process.
  13. bool QueryBroker(IpcTag ipc_id, CountedParameterSetBase* params);
  14. extern "C" {
  15. // Interception of NtSetInformationThread on the child process.
  16. // It should never be called directly.
  17. SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtSetInformationThread(
  18. NtSetInformationThreadFunction orig_SetInformationThread, HANDLE thread,
  19. NT_THREAD_INFORMATION_CLASS thread_info_class, PVOID thread_information,
  20. ULONG thread_information_bytes);
  21. // Interception of NtOpenThreadToken on the child process.
  22. // It should never be called directly
  23. SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtOpenThreadToken(
  24. NtOpenThreadTokenFunction orig_OpenThreadToken, HANDLE thread,
  25. ACCESS_MASK desired_access, BOOLEAN open_as_self, PHANDLE token);
  26. // Interception of NtOpenThreadTokenEx on the child process.
  27. // It should never be called directly
  28. SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtOpenThreadTokenEx(
  29. NtOpenThreadTokenExFunction orig_OpenThreadTokenEx, HANDLE thread,
  30. ACCESS_MASK desired_access, BOOLEAN open_as_self, ULONG handle_attributes,
  31. PHANDLE token);
  32. } // extern "C"
  33. } // namespace sandbox
  34. #endif // SANDBOX_WIN_SRC_POLICY_TARGET_H_