| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "sandbox/src/nt_internals.h" | 5 #include "sandbox/win/src/nt_internals.h" |
| 6 #include "sandbox/src/sandbox_types.h" | 6 #include "sandbox/win/src/sandbox_types.h" |
| 7 | 7 |
| 8 #ifndef SANDBOX_SRC_TARGET_INTERCEPTIONS_H__ | 8 #ifndef SANDBOX_SRC_TARGET_INTERCEPTIONS_H__ |
| 9 #define SANDBOX_SRC_TARGET_INTERCEPTIONS_H__ | 9 #define SANDBOX_SRC_TARGET_INTERCEPTIONS_H__ |
| 10 | 10 |
| 11 namespace sandbox { | 11 namespace sandbox { |
| 12 | 12 |
| 13 extern "C" { | 13 extern "C" { |
| 14 | 14 |
| 15 // Interception of NtMapViewOfSection on the child process. | 15 // Interception of NtMapViewOfSection on the child process. |
| 16 // It should never be called directly. This function provides the means to | 16 // It should never be called directly. This function provides the means to |
| 17 // detect dlls being loaded, so we can patch them if needed. | 17 // detect dlls being loaded, so we can patch them if needed. |
| 18 SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtMapViewOfSection( | 18 SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtMapViewOfSection( |
| 19 NtMapViewOfSectionFunction orig_MapViewOfSection, HANDLE section, | 19 NtMapViewOfSectionFunction orig_MapViewOfSection, HANDLE section, |
| 20 HANDLE process, PVOID *base, ULONG_PTR zero_bits, SIZE_T commit_size, | 20 HANDLE process, PVOID *base, ULONG_PTR zero_bits, SIZE_T commit_size, |
| 21 PLARGE_INTEGER offset, PSIZE_T view_size, SECTION_INHERIT inherit, | 21 PLARGE_INTEGER offset, PSIZE_T view_size, SECTION_INHERIT inherit, |
| 22 ULONG allocation_type, ULONG protect); | 22 ULONG allocation_type, ULONG protect); |
| 23 | 23 |
| 24 // Interception of NtUnmapViewOfSection on the child process. | 24 // Interception of NtUnmapViewOfSection on the child process. |
| 25 // It should never be called directly. This function provides the means to | 25 // It should never be called directly. This function provides the means to |
| 26 // detect dlls being unloaded, so we can clean up our interceptions. | 26 // detect dlls being unloaded, so we can clean up our interceptions. |
| 27 SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtUnmapViewOfSection( | 27 SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtUnmapViewOfSection( |
| 28 NtUnmapViewOfSectionFunction orig_UnmapViewOfSection, HANDLE process, | 28 NtUnmapViewOfSectionFunction orig_UnmapViewOfSection, HANDLE process, |
| 29 PVOID base); | 29 PVOID base); |
| 30 | 30 |
| 31 } // extern "C" | 31 } // extern "C" |
| 32 | 32 |
| 33 } // namespace sandbox | 33 } // namespace sandbox |
| 34 | 34 |
| 35 #endif // SANDBOX_SRC_TARGET_INTERCEPTIONS_H__ | 35 #endif // SANDBOX_SRC_TARGET_INTERCEPTIONS_H__ |
| OLD | NEW |