michael@0: // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. michael@0: // Use of this source code is governed by a BSD-style license that can be michael@0: // found in the LICENSE file. michael@0: michael@0: #include "sandbox/win/src/nt_internals.h" michael@0: #include "sandbox/win/src/sandbox_types.h" michael@0: michael@0: #ifndef SANDBOX_SRC_POLICY_TARGET_H__ michael@0: #define SANDBOX_SRC_POLICY_TARGET_H__ michael@0: michael@0: namespace sandbox { michael@0: michael@0: struct CountedParameterSetBase; michael@0: michael@0: // Performs a policy lookup and returns true if the request should be passed to michael@0: // the broker process. michael@0: bool QueryBroker(int ipc_id, CountedParameterSetBase* params); michael@0: michael@0: extern "C" { michael@0: michael@0: // Interception of NtSetInformationThread on the child process. michael@0: // It should never be called directly. michael@0: SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtSetInformationThread( michael@0: NtSetInformationThreadFunction orig_SetInformationThread, HANDLE thread, michael@0: NT_THREAD_INFORMATION_CLASS thread_info_class, PVOID thread_information, michael@0: ULONG thread_information_bytes); michael@0: michael@0: // Interception of NtOpenThreadToken on the child process. michael@0: // It should never be called directly michael@0: SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtOpenThreadToken( michael@0: NtOpenThreadTokenFunction orig_OpenThreadToken, HANDLE thread, michael@0: ACCESS_MASK desired_access, BOOLEAN open_as_self, PHANDLE token); michael@0: michael@0: // Interception of NtOpenThreadTokenEx on the child process. michael@0: // It should never be called directly michael@0: SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtOpenThreadTokenEx( michael@0: NtOpenThreadTokenExFunction orig_OpenThreadTokenEx, HANDLE thread, michael@0: ACCESS_MASK desired_access, BOOLEAN open_as_self, ULONG handle_attributes, michael@0: PHANDLE token); michael@0: michael@0: } // extern "C" michael@0: michael@0: } // namespace sandbox michael@0: michael@0: #endif // SANDBOX_SRC_POLICY_TARGET_H__