Bug 1332523 - Move message indicating when the blocklist is initialized after user32.dll was loaded to the blocklist itself. r=dmajor

--HG--
extra : rebase_source : 4aea579104d2bad56a91f67e66d0af8c4ada9c3d
This commit is contained in:
Mike Hommey 2017-01-12 11:13:40 +09:00
parent e5dc72ad8b
commit 9d2b3754b7
2 changed files with 6 additions and 9 deletions

View File

@ -288,14 +288,6 @@ int main(int argc, char* argv[], char* envp[])
#ifdef HAS_DLL_BLOCKLIST
DllBlocklist_Initialize();
#ifdef DEBUG
// In order to be effective against AppInit DLLs, the blocklist must be
// initialized before user32.dll is loaded into the process (bug 932100).
if (GetModuleHandleA("user32.dll")) {
fprintf(stderr, "DLL blocklist was unable to intercept AppInit DLLs.\n");
}
#endif
#endif
#ifdef MOZ_BROWSER_CAN_BE_CONTENTPROC

View File

@ -757,8 +757,13 @@ DllBlocklist_Initialize()
}
sBlocklistInitAttempted = true;
// In order to be effective against AppInit DLLs, the blocklist must be
// initialized before user32.dll is loaded into the process (bug 932100).
if (GetModuleHandleA("user32.dll")) {
sUser32BeforeBlocklist = true;
#ifdef DEBUG
printf_stderr("DLL blocklist was unable to intercept AppInit DLLs.\n");
#endif
}
NtDllIntercept.Init("ntdll.dll");
@ -773,7 +778,7 @@ DllBlocklist_Initialize()
if (!ok) {
sBlocklistInitFailed = true;
#ifdef DEBUG
printf_stderr ("LdrLoadDll hook failed, no dll blocklisting active\n");
printf_stderr("LdrLoadDll hook failed, no dll blocklisting active\n");
#endif
}
}