diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-19 23:15:59 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-19 23:15:59 +0000 |
commit | cab30871faac531e20f5c4e134d773d83c7a7281 (patch) | |
tree | feae2cc2d6f41efc4886e1a4f690e74c618ed582 /chrome_elf/blacklist/blacklist_interceptions.h | |
parent | 68d0eeb4f98c230419afda0ad2bdf6b576cde3c2 (diff) | |
download | chromium_src-cab30871faac531e20f5c4e134d773d83c7a7281.zip chromium_src-cab30871faac531e20f5c4e134d773d83c7a7281.tar.gz chromium_src-cab30871faac531e20f5c4e134d773d83c7a7281.tar.bz2 |
Reland of http://crrev.com/241548.
It broke on the main waterfall after going through the CQ. Two changes:
* No-op the loading test on 64-bit.
* Remove the 'IgnoreAllDefaultLibraries' directive. This seems to exclude
the CRT on some builders.
Original CL description:
Chrome browser process DLL blacklist.
This patch allows for blocking of module loading in the browser process.
It does not actually prevent any modules from loading.
Original Review URL: https://codereview.chromium.org/107663008
BUG=329023
TEST=chrome_elf_unittests.exe
TBR=cpu
Review URL: https://codereview.chromium.org/118343004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241972 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_elf/blacklist/blacklist_interceptions.h')
-rw-r--r-- | chrome_elf/blacklist/blacklist_interceptions.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/chrome_elf/blacklist/blacklist_interceptions.h b/chrome_elf/blacklist/blacklist_interceptions.h new file mode 100644 index 0000000..dfb4495 --- /dev/null +++ b/chrome_elf/blacklist/blacklist_interceptions.h @@ -0,0 +1,33 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_ELF_BLACKLIST_BLACKLIST_INTERCEPTIONS_H_ +#define CHROME_ELF_BLACKLIST_BLACKLIST_INTERCEPTIONS_H_ + +#include "sandbox/win/src/nt_internals.h" +#include "sandbox/win/src/sandbox_types.h" + +namespace blacklist { + +bool InitializeInterceptImports(); + +// Interception of NtMapViewOfSection within the current process. +// It should never be called directly. This function provides the means to +// detect dlls being loaded, so we can patch them if needed. +SANDBOX_INTERCEPT NTSTATUS WINAPI BlNtMapViewOfSection( + NtMapViewOfSectionFunction orig_MapViewOfSection, + HANDLE section, + HANDLE process, + PVOID *base, + ULONG_PTR zero_bits, + SIZE_T commit_size, + PLARGE_INTEGER offset, + PSIZE_T view_size, + SECTION_INHERIT inherit, + ULONG allocation_type, + ULONG protect); + +} // namespace blacklist + +#endif // CHROME_ELF_BLACKLIST_BLACKLIST_INTERCEPTIONS_H_ |