Adds custom driver trail example

This commit is contained in:
Felipe Zimmerle
2018-12-20 00:28:37 -03:00
parent cb1a53391d
commit 3668024bfa
10 changed files with 373 additions and 3 deletions

View File

@@ -35,6 +35,9 @@
using modsecurity::Rule;
using modsecurity::Rules;
namespace yy {
class location;
}
namespace modsecurity {
namespace Parser {
@@ -69,25 +72,32 @@ class Driver {
}
return m_trail->addSecRule(rule);
}
int addSecAction(Rule *rule) {
if (!m_trail) {
return -1;
}
return m_trail->addSecAction(rule);
}
int addSecMarker(std::string marker) {
if (!m_trail) {
return -1;
}
return m_trail->addSecMarker(marker);
}
int addSecRuleScript(RuleScript *rule) {
int addSecRuleScript(Rule *rule) {
if (!m_trail) {
return -1;
}
return m_trail->addSecRuleScript(rule);
}
DriverTrail *m_trail;
bool m_traceScanning;
@@ -103,4 +113,5 @@ class Driver {
} // namespace Parser
} // namespace modsecurity
#endif // HEADERS_MODSECURITY_PARSER_DRIVER_H_