mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
IIS: Creates IIS_VERSION definition
This definition is currently used in two different circumstances: Report with accuracy that the server is an IIS (status call), and also show the amount of loaded remote rules on the windows logs. Different from Apache which loads the rules twice, IIS just do it once.
This commit is contained in:
parent
6c0cdab35a
commit
f6d6cea015
@ -19,6 +19,11 @@ LIBS = $(APACHE)\lib\libhttpd.lib \
|
||||
###########################################################################
|
||||
###########################################################################
|
||||
|
||||
|
||||
!IF "$(IIS_BUILD)" == "yes"
|
||||
DEFS=$(DEFS) -DVERSION_IIS
|
||||
!ENDIF
|
||||
|
||||
CC = CL
|
||||
|
||||
MT = mt
|
||||
|
@ -768,9 +768,16 @@ static int hook_post_config(apr_pool_t *mp, apr_pool_t *mp_log, apr_pool_t *mp_t
|
||||
* Checking if it is not the first time that we are in this very function.
|
||||
* We want to show the messages below during the start and the reload.
|
||||
*
|
||||
* Turns out that IIS version does not hit it twice, thus, we have to show
|
||||
* the message in the first (and unique) opportunity.
|
||||
*/
|
||||
#ifdef VERSION_IIS
|
||||
if (first_time == 1)
|
||||
{
|
||||
#else
|
||||
if (first_time != 1)
|
||||
{
|
||||
#endif
|
||||
#ifdef WITH_REMOTE_RULES
|
||||
if (remote_rules_server != NULL)
|
||||
{
|
||||
|
@ -349,7 +349,11 @@ int DSOLOCAL msc_beacon_string (char *beacon_string, int beacon_string_max_len)
|
||||
#endif
|
||||
libxml = LIBXML_DOTTED_VERSION;
|
||||
modsec = MODSEC_VERSION;
|
||||
#ifdef IIS_VERSION
|
||||
apache = "IIS";
|
||||
#else
|
||||
apache = real_server_signature;
|
||||
#endif
|
||||
|
||||
/* 6 represents: strlen("(null)") */
|
||||
beacon_string_len = (modsec ? strlen(modsec) : 6) +
|
||||
|
@ -15,7 +15,7 @@ set CURRENT_DIR=%cd%
|
||||
cd ..\apache2
|
||||
del *.obj *.dll *.lib
|
||||
del libinjection\*.obj libinjection\*.dll libinjection\*.lib
|
||||
NMAKE -f Makefile.win APACHE=..\iis\%DEPENDENCIES_DIR%\Apache24 PCRE=..\iis\%DEPENDENCIES_DIR%\pcre LIBXML2=..\iis\%DEPENDENCIES_DIR%\libxml2 LUA=..\iis\%DEPENDENCIES_DIR%\lua\src VERSION=VERSION_IIS YAJL=..\iis\%DEPENDENCIES_DIR%\yajl\build\yajl-2.0.1 SSDEEP=..\iis\%DEPENDENCIES_DIR%\ssdeep CURL=..\iis\%DEPENDENCIES_DIR%\curl
|
||||
NMAKE -f Makefile.win APACHE=..\iis\%DEPENDENCIES_DIR%\Apache24 PCRE=..\iis\%DEPENDENCIES_DIR%\pcre LIBXML2=..\iis\%DEPENDENCIES_DIR%\libxml2 LUA=..\iis\%DEPENDENCIES_DIR%\lua\src VERSION=VERSION_IIS YAJL=..\iis\%DEPENDENCIES_DIR%\yajl\build\yajl-2.0.1 SSDEEP=..\iis\%DEPENDENCIES_DIR%\ssdeep CURL=..\iis\%DEPENDENCIES_DIR%\curl IIS_BUILD=yes
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
|
||||
@echo mlogc...
|
||||
|
Loading…
x
Reference in New Issue
Block a user