update(userspace/engine,userspace/falco): improved some string warnings.

Always print warnings while loading rules.
Print a single line when warning for ignored events.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
Federico Di Pierro
2022-01-24 15:01:10 +01:00
committed by poiana
parent 96529300f6
commit 1a485c3447
3 changed files with 27 additions and 7 deletions

View File

@@ -452,7 +452,7 @@ void falco_rules::load_rules(const string &rules_content,
throw falco_exception(os.str());
}
if (verbose && os.str() != "") {
if (os.str() != "") {
// We don't really have a logging callback
// from the falco engine, but this would be a
// good place to use it.

View File

@@ -68,6 +68,9 @@ void falco_ruleset::ruleset_filters::add_filter(std::shared_ptr<filter_wrapper>
{
std::set<uint16_t> fevttypes = wrap->filter->evttypes();
// TODO: who fills this one for rules without evt.type specified?
// Can this be actually empty?
// Is m_filter_all_event_types useful?
if(fevttypes.empty())
{
// Should run for all event types