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_FILESYSTEM_INTERCEPTION_H__ michael@0: #define SANDBOX_SRC_FILESYSTEM_INTERCEPTION_H__ michael@0: michael@0: namespace sandbox { michael@0: michael@0: extern "C" { michael@0: michael@0: // Interception of NtCreateFile on the child process. michael@0: SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtCreateFile( michael@0: NtCreateFileFunction orig_CreateFile, PHANDLE file, michael@0: ACCESS_MASK desired_access, POBJECT_ATTRIBUTES object_attributes, michael@0: PIO_STATUS_BLOCK io_status, PLARGE_INTEGER allocation_size, michael@0: ULONG file_attributes, ULONG sharing, ULONG disposition, ULONG options, michael@0: PVOID ea_buffer, ULONG ea_length); michael@0: michael@0: // Interception of NtOpenFile on the child process. michael@0: SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtOpenFile( michael@0: NtOpenFileFunction orig_OpenFile, PHANDLE file, ACCESS_MASK desired_access, michael@0: POBJECT_ATTRIBUTES object_attributes, PIO_STATUS_BLOCK io_status, michael@0: ULONG sharing, ULONG options); michael@0: michael@0: // Interception of NtQueryAtttributesFile on the child process. michael@0: // It should never be called directly. michael@0: SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtQueryAttributesFile( michael@0: NtQueryAttributesFileFunction orig_QueryAttributes, michael@0: POBJECT_ATTRIBUTES object_attributes, michael@0: PFILE_BASIC_INFORMATION file_attributes); michael@0: michael@0: // Interception of NtQueryFullAtttributesFile on the child process. michael@0: // It should never be called directly. michael@0: SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtQueryFullAttributesFile( michael@0: NtQueryFullAttributesFileFunction orig_QueryAttributes, michael@0: POBJECT_ATTRIBUTES object_attributes, michael@0: PFILE_NETWORK_OPEN_INFORMATION file_attributes); michael@0: michael@0: // Interception of NtSetInformationFile on the child process. michael@0: SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtSetInformationFile( michael@0: NtSetInformationFileFunction orig_SetInformationFile, HANDLE file, michael@0: PIO_STATUS_BLOCK io_status, PVOID file_information, ULONG length, michael@0: FILE_INFORMATION_CLASS file_information_class); michael@0: michael@0: } // extern "C" michael@0: michael@0: } // namespace sandbox michael@0: michael@0: #endif // SANDBOX_SRC_FILESYSTEM_INTERCEPTION_H__