actions: Removes Rule parameter from runtime execute

Generals organization on the Action class
This commit is contained in:
Felipe Zimmerle
2020-05-18 21:33:03 -03:00
parent 1b705aeb54
commit d6e8352873
190 changed files with 3118 additions and 2779 deletions

View File

@@ -13,29 +13,36 @@
*
*/
#include <string>
#include <memory>
#include "modsecurity/actions/action.h"
#include "src/actions/action_allowed_in_sec_default_action.h"
#include "src/actions/action_type_rule_metadata.h"
#include "src/rule_with_actions.h"
#ifndef SRC_ACTIONS_LOG_H_
#define SRC_ACTIONS_LOG_H_
class Transaction;
namespace modsecurity {
class Transaction;
namespace actions {
class Log : public Action {
class Log : public ActionTypeRuleMetaData,
public ActionAllowedAsSecDefaultAction {
public:
explicit Log(const std::string &action)
: Action(action, RunTimeOnlyIfMatchKind) { }
Log()
: Action("log")
{ }
void configure(RuleWithActions *rule) override {
rule->setHasLogAction(true);
}
bool execute(RuleWithActions *rule, Transaction *transaction) override;
};
} // namespace actions
} // namespace modsecurity