mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Informs problems and successfully loaded external resources during reload
Resources load mechanism as the SecRemoteRuels were not showing information about the loaded rules while Apache was reloaded. This patch add such information to reload in the same way that it was showing on restart.
This commit is contained in:
@@ -762,14 +762,15 @@ static int hook_post_config(apr_pool_t *mp, apr_pool_t *mp_log, apr_pool_t *mp_t
|
||||
"it by set SecStatusEngine to On.");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (remote_rules_fail_message != NULL)
|
||||
{
|
||||
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL, "ModSecurity: " \
|
||||
"Problems loading external resources: %s",
|
||||
remote_rules_fail_message);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
if (first_time != 1)
|
||||
{
|
||||
#ifdef WITH_REMOTE_RULES
|
||||
if (remote_rules_server != NULL)
|
||||
{
|
||||
@@ -789,6 +790,12 @@ static int hook_post_config(apr_pool_t *mp, apr_pool_t *mp_log, apr_pool_t *mp_t
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (remote_rules_fail_message != NULL)
|
||||
{
|
||||
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL, "ModSecurity: " \
|
||||
"Problems loading external resources: %s",
|
||||
remote_rules_fail_message);
|
||||
}
|
||||
}
|
||||
|
||||
srand((unsigned int)(time(NULL) * getpid()));
|
||||
|
Reference in New Issue
Block a user