security/sandbox/win/src/filesystem_interception.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/sandbox/win/src/filesystem_interception.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,53 @@
     1.4 +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
     1.5 +// Use of this source code is governed by a BSD-style license that can be
     1.6 +// found in the LICENSE file.
     1.7 +
     1.8 +#include "sandbox/win/src/nt_internals.h"
     1.9 +#include "sandbox/win/src/sandbox_types.h"
    1.10 +
    1.11 +#ifndef SANDBOX_SRC_FILESYSTEM_INTERCEPTION_H__
    1.12 +#define SANDBOX_SRC_FILESYSTEM_INTERCEPTION_H__
    1.13 +
    1.14 +namespace sandbox {
    1.15 +
    1.16 +extern "C" {
    1.17 +
    1.18 +// Interception of NtCreateFile on the child process.
    1.19 +SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtCreateFile(
    1.20 +    NtCreateFileFunction orig_CreateFile, PHANDLE file,
    1.21 +    ACCESS_MASK desired_access, POBJECT_ATTRIBUTES object_attributes,
    1.22 +    PIO_STATUS_BLOCK io_status, PLARGE_INTEGER allocation_size,
    1.23 +    ULONG file_attributes, ULONG sharing, ULONG disposition, ULONG options,
    1.24 +    PVOID ea_buffer, ULONG ea_length);
    1.25 +
    1.26 +// Interception of NtOpenFile on the child process.
    1.27 +SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtOpenFile(
    1.28 +    NtOpenFileFunction orig_OpenFile, PHANDLE file, ACCESS_MASK desired_access,
    1.29 +    POBJECT_ATTRIBUTES object_attributes, PIO_STATUS_BLOCK io_status,
    1.30 +    ULONG sharing, ULONG options);
    1.31 +
    1.32 +// Interception of NtQueryAtttributesFile on the child process.
    1.33 +// It should never be called directly.
    1.34 +SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtQueryAttributesFile(
    1.35 +    NtQueryAttributesFileFunction orig_QueryAttributes,
    1.36 +    POBJECT_ATTRIBUTES object_attributes,
    1.37 +    PFILE_BASIC_INFORMATION file_attributes);
    1.38 +
    1.39 +// Interception of NtQueryFullAtttributesFile on the child process.
    1.40 +// It should never be called directly.
    1.41 +SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtQueryFullAttributesFile(
    1.42 +    NtQueryFullAttributesFileFunction orig_QueryAttributes,
    1.43 +    POBJECT_ATTRIBUTES object_attributes,
    1.44 +    PFILE_NETWORK_OPEN_INFORMATION file_attributes);
    1.45 +
    1.46 +// Interception of NtSetInformationFile on the child process.
    1.47 +SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtSetInformationFile(
    1.48 +    NtSetInformationFileFunction orig_SetInformationFile, HANDLE file,
    1.49 +    PIO_STATUS_BLOCK io_status, PVOID file_information, ULONG length,
    1.50 +    FILE_INFORMATION_CLASS file_information_class);
    1.51 +
    1.52 +}  // extern "C"
    1.53 +
    1.54 +}  // namespace sandbox
    1.55 +
    1.56 +#endif  // SANDBOX_SRC_FILESYSTEM_INTERCEPTION_H__

mercurial