Adds SecStatusEngine On/Off switch

Add the possibility to turn the Status Engine On or Off using the
directive SecStatusEngine [On/Off]. By default it is On.
This commit is contained in:
Felipe Zimmerle
2013-12-02 13:22:39 -08:00
parent 0c6a661c69
commit f86a71f7a7
4 changed files with 41 additions and 2 deletions

View File

@@ -2083,6 +2083,23 @@ static const char *cmd_rule_engine(cmd_parms *cmd, void *_dcfg, const char *p1)
return NULL;
}
static const char *cmd_STATUS_ENGINE(cmd_parms *cmd, void *_dcfg, const char *p1)
{
if (strcasecmp(p1, "on") == 0) {
status_engine_state = STATUS_ENGINE_ENABLED;
}
else if (strcasecmp(p1, "off") == 0) {
status_engine_state = STATUS_ENGINE_DISABLED;
}
else {
return apr_psprintf(cmd->pool, "ModSecurity: Invalid value for " \
"SecStatusEngine: %s", p1);
}
return NULL;
}
static const char *cmd_rule_inheritance(cmd_parms *cmd, void *_dcfg, int flag)
{
directory_config *dcfg = (directory_config *)_dcfg;
@@ -3297,6 +3314,14 @@ const command_rec module_directives[] = {
"On or Off"
),
AP_INIT_TAKE1 (
"SecStatusEngine",
cmd_status_engine,
NULL,
CMD_SCOPE_ANY,
"On or Off"
),
AP_INIT_TAKE1 (
"SecXmlExternalEntity",
cmd_xml_external_entity,