[Winpcap-users] [winpcap] branch merge_winpcap_oem created (now 3e0335d)
WinPcap code review
code-review-do-not-reply at winpcap.org
Wed Jun 3 20:47:12 UTC 2015
Submitter: Gerald Combs (gerald at wireshark.org)
Changed: branch: merge_winpcap_oem
[ log message not found ]
at 3e0335d Merge in winpcap_oem/master.
This branch includes the following new commits:
new 3406b83 *** empty log message ***
new 76d9b28 WinPcap OEM -- Initial import.
new 34d81e7 Added protection module in WinpcapOEM
new 7d6fbe2 Added error message box after the failure of the OEM protection check
new 2e274b6 Added dummy tools.bin file (hashes of recognized tools)
new 3b50963 Incremented dump length to calculate hash of an executable file (from 1KB to 10KB)
new 60b8320 Cleanups. Renamed UnloadAndDeleteDll into DeleteDll.
new f052de6 Added a preprocessor option to look for the resources in the current project instead of using the dll handle. This turns to be useful when linking winpcap OEM statically.
new 878a1c4 Move the deletion of packet.dll from dll unload to WoemEnterDll().
new 57fa22e Renamed UnloadAndDeleteDll() into DeleteDll(). Disabled debug tracing.
new 72856ef Added two configurations to compile WinPcap OEM with security. The default configurations don't have security any more.
new 1d5f8b5 Added the option to compile WinPcap OEM as a static library
new e207ab7 Added a sample project to compile WinDump with the static WinPcao OEM.
new c4d4138 Added support for the new PacketSetLoopbackBehavior() packet.dll function.
new 9261616 Added a driver build script for the OEM version.
new 8d7af62 Removed some debug garbage.
new dcc0cb9 Made the semaphore name instance-related, so that we have different semaphores for different OEM builds.
new 0539a96 Added a file with the instructions to build winpcap oem. The instrcutions for the moment are not complete.
new 4dd25b0 Added a postbuild script to copy some lib files in the winpcap directory.
new 20f8c8f Added a project to create a static version of winpcap oem. Not finished yet.
new d399417 Added a small program to convert binary files in C structures. This is used by the static library build process of WinPcap OEM.
new db75764 Added the PacketStartOem() to activate WinPcap OEM. Better error reporting.
new f3bb577 Some changes for the implementation of the static version.
new b47ed13 Added support for the new PacketStartOem() function. Cleanups.
new cdc1673 Added support for the new PacketStartOem() function.
new 2be055a Added a postbuild stpe to copy some lib files to the winpcap folder.
new 07ff73e Better error reporting.
new c1348c2 Added a second postbuild script for the relase version.
new 19e89a6 Completed the build instructions.
new 1653a9a Fixes in the postbuild scripts.
new 06b08e5 Fixed a wrong function prototype.
new f446153 Improved the registry key organization. Now the structure is HKLM\\SOFTWARE\\CaceTech\\WinPcapOem\\<Version>\
new 712d3b2 Added a new header containing all the code to trace the code on file or to OutputDebugString.
new 770209c Added the usual #ifdef/#define at the beginning of the include file. Added the prototype for WoemGetResource here. Added the extern definitions for some global variables (still need to check their actual utility). Uncommented the old tracing APIs for WinPcapOem.cpp (still need to be converted to the new tracing API).
new 9f344c5 Added the usual #ifdef/#define at the beginning of the include file. Renamed getHash into GetHash. Added a parameter into GetHash containing the length of the input buffer for the hash.
new f8b4e1e General cleanup of the code: - fixed some handle leaks in case one of the Crypt APIs fail - moved all the tracing code to the new one provided by WoemDebug.h - fixed a problem with CryptAcquireContext: it should be called with the flag CRYPT_VERIFYCONTEXT in case we only want to compute Hash values.
new 1baa099 Added the usual #ifdef/#define at the beginning of the include file. Fixed the prototype and name of IsProcAuthorized. Fixed the prototype and name of setProcAuthorization (to WoemGerCurrentProcessAuthorization). Now it doesn't modify a global variable, but instead it returns an error code with the possible statuses: - authorization ok - authorization denied - failure in computing the authorization Added a comment for this function. Removed some function definitions (m [...]
new 63f2fc2 Fixed the prototype and name of IsProcAuthorized. Fixed the prototype and name of setProcAuthorization (to WoemGerCurrentProcessAuthorization). Now it doesn't modify a global variable, but instead it returns an error code with the possible statuses: - authorization ok - authorization denied - failure in computing the authorization Added a comment for this function. Reviewed and rewrote all the functions in this file: - fixed a problem when the current process file was [...]
new ce67442 Renamed all the global variables to g_<name>. Moved all the extern declarations to WinPcapOem.h.
new f1a7fc4 Renamed all the global variables to g_<name>. Moved the check for the hash of the current process from the DllEntry to WoemEnterDll (since it's not safe to call functions outside kernel32.dll from a DllEntry, as documented in MSDN). Fixed some wrong error reporting functions. Substituted some explicit strings "SOFTWARE\\\\CACEWinPcap" with the proper define (WINPCAP_INSTANCE_KEY).
new aa39dc2 Uncommented a TRACE_ENTER() call that was wrongly commented out.
new bbc441a Added a wrapper for PacketSetLoopbackBehavior()
new 28252a7 Added some code in order to retrieve and restore the LastError in the tracing functions, so that we do not interact with the normal operation of the APIs.
new b00ad1f Fixed the signature of LoadPacketDll and WoemEnterDll, so that they return an error string. Added a volatile declaration to a couple of global variables.
new c9eaed2 Converted all the TracePrint calls to TRACE_MESSAGE
new e34ba20 Fixed the snippet of code to be added to pcap (pcap_start_oem).
new a074082 Got rid of PacketGetLastOemError.
new 97683a4 Cleaned up and added tracing to all the PacketXXX wrapper functions.
new 5a02398 Added a global critical section protecting the global mutex g_hGlobalMutex. Protected WoemEnterDll with the mutex, using an internal unprotected function (WoemEnterDllInternal) and an external one (WoemEnterDll) that just acquires the critical section and calls the internal one. Modified the signature of WoemEnterDll(Internal) so that it returns an error string in case of failure. Added better tracng to WoemEnterDll(Internal). Fixed some constants in the code (5 is ERR [...]
new 7f61f32 Fixed a wrong variable name that was causing a compilation error.
new 5901127 WoemCreateBinaryNames() was called only for the first process using WinPcap OEM. This prevented all the following processes to unpack and run packet.dll and the other binaries.
new 2de3964 Added another check to verify that the input Value buffer has the right size.
new ae5c23d Fixed a bug in WoemInitialize: if WoemEnterDll is successful, set g_StillToInit to FALSE.
new 3d12a53 General code cleanup: - removes several global strings (that were not actually global). - Made better use of the WinPcap global strings - got rid of all the WCHAR strings (we only use ANSI strings now) - Rewrote the code saving the keys into the registry: now we use REG_SZ keys (strings), instead of binary blobs. - Fixed a bug by which the registry keys were not deleted upon DLL unloading. - Removed some usless strings from the registry - Cleaned up the strings rel [...]
new 81c81c6 Added the prototype for WoemDeleteNameRegistryEntries(). Commented out all the old logging facilities..
new bad03af Added Visual Studio 2003 projects for WinPcapOem, PacketNT4 and Packet2k.
new f87ae93 Added a prebuild script to WinPcap Oem, so that the proper drivers and dlls are copied and renamed to .\\Binaries
new 1885ef0 Cleaned up the project virtual folders (Source Files, Include Files).
new 41069a0 Fixed the path of WpcapNames.h. Added some files to the project.
new 575bfcb Added the PacketAndWan project to the WinPcap OEM VC6 workspace.
new b2c2a25 Added a Visual Studio.NET 2003 solution for the WinPcap OEM project (NOTE: it only includes the WinPcap OEM workspace, use MakeAll.sln in the root to open all the WinPcap OEM related projects).
new 495f055 Added a Visual Studio.NET 2003 solution for the entire WinPcap OEM project.
new c66b3e7 Fixed the paths of the packet.dll binaries.
new 75c34ab Cleaned up the build scripts for NT4 and 2k/XP/2003/vista: now we pass any additional define for the build with the environment variable USER_C_DEFINES.
new 3fd8507 Added some code to detect the processor architecture and refuse to initialize WinPcap OEM if it's not x86.
new 1f1534c Cleaned up the script: - now it's possible to execute it directly from here, without moving the file - enabled PREFast analysis - added some code to set the target directory for the driver.
new 462a77d Cleaned up the script: - now it's possible to execute it directly from here, without moving the file - added some code to set the target directory for the driver.
new 0225b8d Fixed the script so that it copies the driver from the right location.
new fb7db38 Added some code in the compilation script to solve some quirks with copy (it seems that "copy" on NT4 has big problems expanding something like foo\\bar\\dep\\bin\\nt4\\*.*....).
new c913582 Added a couple of trace messages. Fixed a problem while initializing WinPcapOem: we need to change the value of g_StillToInit while holding the mutex protecting WoemEnterDll.
new d19c167 Added several trace messages. Fixed a problem while initializing WinPcapOem: we need to change the value of g_StillToInit while holding the mutex protecting WoemEnterDll.
new d8d9566 Added an extern declaration for g_StillToInit.
new cdf2c16 Enabled buffer security checks (/GS) to packet.dll (NT2k)
new a310711 Fixed some wrong paths.
new 79f7e5a Cleaned up the code checking for Woem activation (now both activation and security are done within WoemInitialize).
new 44870da Added versioning info.
new d8f2bde Added a global version file for the entire WinPcap OEM project.
new 24c56f4 Added some code to copy the proper NPF.RC version file into the driver directory.
new 7af139d Added some code to copy the proper NPF.RC version file into the driver directory. Added some environment flags to generate PDB files in both the free and checked version of the driver.
new 2dce9c6 Added version info to packet.dll (NT5) for WinPcap OEM.
new f2b1061 Added version info to packet.dll (NT4) for WinPcap OEM.
new 6cfdef8 Enabled Buffer Security Checks (/GS). Added version.h to the project.
new ecab8c0 Cleaned up the resource file: - removed a useless string resource - added the inclusion of WinPcapOem.rc2 - added afxres.h, otherwise the version resources are not generated.
new 0fa8f3f Added a string containing the version of libpcap (quick fix).
new f4b8645 Added the project for wpcap.dll OEM (and its related RC files for versioning).
new 931cdb8 Added a new source file containing pcap_start_oem() (used by WinPcap OEM only).
new 615926b Added a preliminary doxygen project for WinPcap OEM.
new c3d6cab Added all the scripts to generate the WinPcap OEM deleveloper's pack and the TNT bin folder.
new fb80efe Added wpcap.dll to the master solution file.
new 551b145 Added some garbage zeroes in the tools.bin fake file, to make the resource compiler happy.
new 779a717 Renamed the XXX_Security configurations to XXX_TNT (since this is the build for The Network Toolkit).
new d93c487 Fixed some wrong lib paths. Enabled /GS in the debug build as well.
new 5814ff8 Fixed an error string (if we can retrieve the version string, PacketGetVersion will return "<unknown>", rather than an error message in the version string!).
new e0cdc93 Disabled the creation/deletion of registry keys for the customization of WinPcap names.
new 4ea64da Updated version info to 188.8.131.527.tnt
new d1dcbb1 Updated version info to 184.108.40.2067.
... 227 lines suppressed ...
More information about the Winpcap-users