Refactoring on the audit logs implementation

Among of other things, it is now supporting shared file locks between
different process.
This commit is contained in:
Felipe Zimmerle
2016-12-14 10:09:53 -03:00
parent 9707d46e45
commit 2e9a35c358
24 changed files with 661 additions and 260 deletions

View File

@@ -16,7 +16,7 @@
#include "src/parser/driver.h"
#include "src/parser/seclang-parser.hh"
#include "src/audit_log/audit_log.h"
#include "modsecurity/audit_log.h"
#include "modsecurity/rules_properties.h"
using modsecurity::audit_log::AuditLog;
@@ -116,6 +116,7 @@ int Driver::addSecRule(Rule *rule) {
int Driver::parse(const std::string &f, const std::string &ref) {
std::string error;
lastRule = NULL;
loc.push_back(new yy::location());
if (ref.empty()) {
@@ -131,11 +132,13 @@ int Driver::parse(const std::string &f, const std::string &ref) {
int res = parser.parse();
scan_end();
if (m_auditLog->init() == false) {
m_parserError << "Problems while initializing the audit logs" \
<< std::endl;
/*
if (m_auditLog->init(&error) == false) {
m_parserError << "Problems while initializing the audit logs: " \
<< error << std::endl;
return false;
}
*/
return res == 0;
}

View File

@@ -27,7 +27,7 @@
#include "modsecurity/modsecurity.h"
#include "modsecurity/rules.h"
#include "modsecurity/rules_properties.h"
#include "src/audit_log/audit_log.h"
#include "modsecurity/audit_log.h"
#include "src/parser/seclang-parser.hh"

View File

@@ -49,7 +49,7 @@ class Driver;
#include "src/actions/transformations/transformation.h"
#include "src/actions/ver.h"
#include "src/actions/xmlns.h"
#include "src/audit_log/audit_log.h"
#include "modsecurity/audit_log.h"
#include "modsecurity/modsecurity.h"
#include "modsecurity/rules_properties.h"
#include "modsecurity/rule.h"