tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

DllBlocklist.h (1460B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef mozilla_freestanding_DllBlocklist_h
      8 #define mozilla_freestanding_DllBlocklist_h
      9 
     10 #include "mozilla/Attributes.h"
     11 #include "mozilla/NativeNt.h"
     12 #include "nsWindowsDllInterceptor.h"
     13 #include "mozilla/WinHeaderOnlyUtils.h"
     14 
     15 namespace mozilla {
     16 namespace freestanding {
     17 
     18 NTSTATUS NTAPI patched_LdrLoadDll(PWCHAR aDllPath, PULONG aFlags,
     19                                  PUNICODE_STRING aDllName, PHANDLE aOutHandle);
     20 
     21 MOZ_NO_STACK_PROTECTOR NTSTATUS NTAPI patched_NtMapViewOfSection(
     22    HANDLE aSection, HANDLE aProcess, PVOID* aBaseAddress, ULONG_PTR aZeroBits,
     23    SIZE_T aCommitSize, PLARGE_INTEGER aSectionOffset, PSIZE_T aViewSize,
     24    SECTION_INHERIT aInheritDisposition, ULONG aAllocationType,
     25    ULONG aProtectionFlags);
     26 
     27 using LdrLoadDllPtr = decltype(&::LdrLoadDll);
     28 
     29 extern CrossProcessDllInterceptor::FuncHookType<LdrLoadDllPtr> stub_LdrLoadDll;
     30 
     31 using NtMapViewOfSectionPtr = decltype(&::NtMapViewOfSection);
     32 
     33 extern CrossProcessDllInterceptor::FuncHookType<NtMapViewOfSectionPtr>
     34    stub_NtMapViewOfSection;
     35 
     36 }  // namespace freestanding
     37 }  // namespace mozilla
     38 
     39 #endif  // mozilla_freestanding_DllBlocklist_h