mirror of
https://github.com/falcosecurity/falco.git
synced 2025-08-30 03:33:09 +00:00
Add a configuration::init() that just sets up defaults
(For when no config file is being used)
This commit is contained in:
parent
dc099bfb91
commit
73ec593931
@ -4,9 +4,18 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
|
// If we don't have a configuration file, we just use stdout output and all other defaults
|
||||||
void digwatch_configuration::init()
|
void digwatch_configuration::init()
|
||||||
{
|
{
|
||||||
string m_config_file = DIGWATCH_CONF_FILE;
|
output_config stdout_output;
|
||||||
|
stdout_output.name = "stdout";
|
||||||
|
m_outputs.push_back(stdout_output);
|
||||||
|
}
|
||||||
|
|
||||||
|
void digwatch_configuration::init(string conf_filename)
|
||||||
|
{
|
||||||
|
string m_config_file = conf_filename;
|
||||||
m_config = new yaml_configuration(m_config_file);
|
m_config = new yaml_configuration(m_config_file);
|
||||||
|
|
||||||
m_rules_file = m_config->get_scalar<string>("rules_file", "/etc/digwatch.conf");
|
m_rules_file = m_config->get_scalar<string>("rules_file", "/etc/digwatch.conf");
|
||||||
|
@ -92,6 +92,7 @@ private:
|
|||||||
class digwatch_configuration
|
class digwatch_configuration
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
void init(std::string conf_filename);
|
||||||
void init();
|
void init();
|
||||||
std::string m_rules_file;
|
std::string m_rules_file;
|
||||||
std::string m_priority_level;
|
std::string m_priority_level;
|
||||||
|
Loading…
Reference in New Issue
Block a user