1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/sandbox/win/src/target_interceptions.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,35 @@ 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_TARGET_INTERCEPTIONS_H__ 1.12 +#define SANDBOX_SRC_TARGET_INTERCEPTIONS_H__ 1.13 + 1.14 +namespace sandbox { 1.15 + 1.16 +extern "C" { 1.17 + 1.18 +// Interception of NtMapViewOfSection on the child process. 1.19 +// It should never be called directly. This function provides the means to 1.20 +// detect dlls being loaded, so we can patch them if needed. 1.21 +SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtMapViewOfSection( 1.22 + NtMapViewOfSectionFunction orig_MapViewOfSection, HANDLE section, 1.23 + HANDLE process, PVOID *base, ULONG_PTR zero_bits, SIZE_T commit_size, 1.24 + PLARGE_INTEGER offset, PSIZE_T view_size, SECTION_INHERIT inherit, 1.25 + ULONG allocation_type, ULONG protect); 1.26 + 1.27 +// Interception of NtUnmapViewOfSection on the child process. 1.28 +// It should never be called directly. This function provides the means to 1.29 +// detect dlls being unloaded, so we can clean up our interceptions. 1.30 +SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtUnmapViewOfSection( 1.31 + NtUnmapViewOfSectionFunction orig_UnmapViewOfSection, HANDLE process, 1.32 + PVOID base); 1.33 + 1.34 +} // extern "C" 1.35 + 1.36 +} // namespace sandbox 1.37 + 1.38 +#endif // SANDBOX_SRC_TARGET_INTERCEPTIONS_H__