mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-26 14:52:20 +00:00
chore(engine): using is_defined config method instead of private get_node
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
This commit is contained in:
parent
7fb61ba4a3
commit
1a7611a761
@ -280,8 +280,7 @@ void falco_configuration::init(string conf_filename, list<string> &cmdline_optio
|
|||||||
|
|
||||||
std::set<std::string> load_plugins;
|
std::set<std::string> load_plugins;
|
||||||
|
|
||||||
YAML::Node load_plugins_node;
|
bool load_plugins_node_defined = m_config->is_defined("load_plugins");
|
||||||
m_config->get_node(load_plugins_node, "load_plugins");
|
|
||||||
|
|
||||||
m_config->get_sequence<set<string>>(load_plugins, "load_plugins");
|
m_config->get_sequence<set<string>>(load_plugins, "load_plugins");
|
||||||
|
|
||||||
@ -302,7 +301,7 @@ void falco_configuration::init(string conf_filename, list<string> &cmdline_optio
|
|||||||
// If load_plugins was not specified at all, every
|
// If load_plugins was not specified at all, every
|
||||||
// plugin is added. Otherwise, the plugin must be in
|
// plugin is added. Otherwise, the plugin must be in
|
||||||
// the load_plugins list.
|
// the load_plugins list.
|
||||||
if(!load_plugins_node.IsDefined() || load_plugins.find(p.m_name) != load_plugins.end())
|
if(!load_plugins_node_defined || load_plugins.find(p.m_name) != load_plugins.end())
|
||||||
{
|
{
|
||||||
m_plugins.push_back(p);
|
m_plugins.push_back(p);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user