fix(app_actions): perform validate_rules before load_rules action

Perform the validate_rules action before the load_rules action. This
ensures that *only* the rules files named with -V arguments are
validated.

This fixes https://github.com/falcosecurity/falco/issues/2087.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
Mark Stemm 2022-06-22 12:14:33 -07:00 committed by poiana
parent 5dce4d2025
commit 85ca1eb3dd

View File

@ -133,10 +133,10 @@ bool application::run(std::string &errstr, bool &restart)
std::bind(&application::init_falco_engine, this),
std::bind(&application::list_fields, this),
std::bind(&application::list_plugins, this),
std::bind(&application::validate_rules_files, this),
std::bind(&application::load_rules_files, this),
std::bind(&application::print_ignored_events, this),
std::bind(&application::print_support, this),
std::bind(&application::validate_rules_files, this),
std::bind(&application::attach_inotify_signals, this),
std::bind(&application::daemonize, this),
std::bind(&application::init_outputs, this),