mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Adds AuditLog class
The properties related to the Audit Log were saved into the classes Rules and Dirver, now all those properties will be saved into the AuditLog class.
This commit is contained in:
@@ -18,7 +18,9 @@
|
||||
#include "parser/seclang-parser.hh"
|
||||
|
||||
Driver::Driver()
|
||||
: trace_scanning(false), trace_parsing(false) {
|
||||
: trace_scanning(false),
|
||||
trace_parsing(false),
|
||||
audit_log(new ModSecurity::AuditLog()) {
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +48,11 @@ int Driver::parse(const std::string &f) {
|
||||
|
||||
int res = parser.parse();
|
||||
|
||||
if (this->audit_log->init() == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
scan_end();
|
||||
return res;
|
||||
}
|
||||
|
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "modsecurity/modsecurity.h"
|
||||
#include "src/rule.h"
|
||||
#include "src/audit_log.h"
|
||||
|
||||
#include "parser/seclang-parser.hh"
|
||||
|
||||
@@ -85,9 +86,11 @@ class Driver {
|
||||
bool sec_audit_engine;
|
||||
bool sec_request_body_access;
|
||||
bool sec_response_body_access;
|
||||
std::string audit_log_path;
|
||||
std::string audit_log_parts;
|
||||
|
||||
std::string debug_log_path;
|
||||
|
||||
ModSecurity::AuditLog *audit_log;
|
||||
|
||||
int debug_level;
|
||||
};
|
||||
|
||||
|
@@ -147,11 +147,11 @@ expression:
|
||||
}
|
||||
| CONFIG_DIR_AUDIT_LOG
|
||||
{
|
||||
driver.audit_log_path = $1;
|
||||
//driver.audit_log_path = $1;
|
||||
}
|
||||
| CONFIG_DIR_AUDIT_LOG_P
|
||||
{
|
||||
driver.audit_log_parts = $1;
|
||||
//driver.audit_log_parts = $1;
|
||||
}
|
||||
| CONFIG_DIR_DEBUG_LVL
|
||||
{
|
||||
|
Reference in New Issue
Block a user