Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
michael@0 | 2 | // Use of this source code is governed by a BSD-style license that can be |
michael@0 | 3 | // found in the LICENSE file. |
michael@0 | 4 | |
michael@0 | 5 | #include "sandbox/win/src/nt_internals.h" |
michael@0 | 6 | #include "sandbox/win/src/sandbox_types.h" |
michael@0 | 7 | |
michael@0 | 8 | #ifndef SANDBOX_SRC_POLICY_TARGET_H__ |
michael@0 | 9 | #define SANDBOX_SRC_POLICY_TARGET_H__ |
michael@0 | 10 | |
michael@0 | 11 | namespace sandbox { |
michael@0 | 12 | |
michael@0 | 13 | struct CountedParameterSetBase; |
michael@0 | 14 | |
michael@0 | 15 | // Performs a policy lookup and returns true if the request should be passed to |
michael@0 | 16 | // the broker process. |
michael@0 | 17 | bool QueryBroker(int ipc_id, CountedParameterSetBase* params); |
michael@0 | 18 | |
michael@0 | 19 | extern "C" { |
michael@0 | 20 | |
michael@0 | 21 | // Interception of NtSetInformationThread on the child process. |
michael@0 | 22 | // It should never be called directly. |
michael@0 | 23 | SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtSetInformationThread( |
michael@0 | 24 | NtSetInformationThreadFunction orig_SetInformationThread, HANDLE thread, |
michael@0 | 25 | NT_THREAD_INFORMATION_CLASS thread_info_class, PVOID thread_information, |
michael@0 | 26 | ULONG thread_information_bytes); |
michael@0 | 27 | |
michael@0 | 28 | // Interception of NtOpenThreadToken on the child process. |
michael@0 | 29 | // It should never be called directly |
michael@0 | 30 | SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtOpenThreadToken( |
michael@0 | 31 | NtOpenThreadTokenFunction orig_OpenThreadToken, HANDLE thread, |
michael@0 | 32 | ACCESS_MASK desired_access, BOOLEAN open_as_self, PHANDLE token); |
michael@0 | 33 | |
michael@0 | 34 | // Interception of NtOpenThreadTokenEx on the child process. |
michael@0 | 35 | // It should never be called directly |
michael@0 | 36 | SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtOpenThreadTokenEx( |
michael@0 | 37 | NtOpenThreadTokenExFunction orig_OpenThreadTokenEx, HANDLE thread, |
michael@0 | 38 | ACCESS_MASK desired_access, BOOLEAN open_as_self, ULONG handle_attributes, |
michael@0 | 39 | PHANDLE token); |
michael@0 | 40 | |
michael@0 | 41 | } // extern "C" |
michael@0 | 42 | |
michael@0 | 43 | } // namespace sandbox |
michael@0 | 44 | |
michael@0 | 45 | #endif // SANDBOX_SRC_POLICY_TARGET_H__ |