mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-28 07:37:32 +00:00
More falco->digwatch renaming
This commit is contained in:
parent
5052039ee1
commit
bde9631cd4
@ -17,13 +17,13 @@ target_link_libraries(falco
|
||||
"${YAMLCPP_LIB}")
|
||||
|
||||
|
||||
set(DIGWATCH_LUA_MAIN "rule_loader.lua")
|
||||
configure_file(config_digwatch.h.in config_digwatch.h)
|
||||
set(FALCO_LUA_MAIN "rule_loader.lua")
|
||||
configure_file(config_falco.h.in config_falco.h)
|
||||
|
||||
install(TARGETS falco DESTINATION bin)
|
||||
install(FILES lua/compiler.lua
|
||||
DESTINATION share/digwatch/lua)
|
||||
DESTINATION share/falco/lua)
|
||||
install(FILES lua/rule_loader.lua
|
||||
DESTINATION share/digwatch/lua)
|
||||
DESTINATION share/falco/lua)
|
||||
install(FILES lua/output.lua
|
||||
DESTINATION share/digwatch/lua)
|
||||
DESTINATION share/falco/lua)
|
||||
|
@ -1,14 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#define DIGWATCH_VERSION "${DIGWATCH_VERSION}"
|
||||
#define FALCO_VERSION "${FALCO_VERSION}"
|
||||
|
||||
#define DIGWATCH_LUA_DIR "/usr/share/digwatch/lua/"
|
||||
#define DIGWATCH_SOURCE_DIR "${PROJECT_SOURCE_DIR}"
|
||||
#define DIGWATCH_SOURCE_CONF_FILE "${PROJECT_SOURCE_DIR}/digwatch.yaml"
|
||||
#define DIGWATCH_INSTALL_CONF_FILE "/etc/digwatch.yaml"
|
||||
#define DIGWATCH_SOURCE_LUA_DIR "${PROJECT_SOURCE_DIR}/userspace/digwatch/lua/"
|
||||
#define FALCO_LUA_DIR "/usr/share/falco/lua/"
|
||||
#define FALCO_SOURCE_DIR "${PROJECT_SOURCE_DIR}"
|
||||
#define FALCO_SOURCE_CONF_FILE "${PROJECT_SOURCE_DIR}/falco.yaml"
|
||||
#define FALCO_INSTALL_CONF_FILE "/etc/falco.yaml"
|
||||
#define FALCO_SOURCE_LUA_DIR "${PROJECT_SOURCE_DIR}/userspace/falco/lua/"
|
||||
|
||||
|
||||
#define DIGWATCH_LUA_MAIN "${DIGWATCH_LUA_MAIN}"
|
||||
#define FALCO_LUA_MAIN "${FALCO_LUA_MAIN}"
|
||||
|
||||
#define PROBE_NAME "${PROBE_NAME}"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "configuration.h"
|
||||
#include "config_digwatch.h"
|
||||
#include "config_falco.h"
|
||||
#include "sinsp.h"
|
||||
#include "logger.h"
|
||||
|
||||
@ -19,7 +19,7 @@ void digwatch_configuration::init(string conf_filename)
|
||||
string m_config_file = conf_filename;
|
||||
m_config = new yaml_configuration(m_config_file);
|
||||
|
||||
m_rules_filename = m_config->get_scalar<string>("rules_file", "/etc/digwatch_rules.conf");
|
||||
m_rules_filename = m_config->get_scalar<string>("rules_file", "/etc/falco_rules.conf");
|
||||
m_json_output = m_config->get_scalar<bool>("json_output", false);
|
||||
|
||||
output_config file_output;
|
||||
|
@ -18,7 +18,7 @@ extern "C" {
|
||||
}
|
||||
|
||||
#include <sinsp.h>
|
||||
#include "config_digwatch.h"
|
||||
#include "config_falco.h"
|
||||
#include "configuration.h"
|
||||
#include "rules.h"
|
||||
#include "formats.h"
|
||||
@ -39,7 +39,7 @@ static void usage()
|
||||
"Usage: falco [options] rules_filename\n\n"
|
||||
"Options:\n"
|
||||
" -h, --help Print this page\n"
|
||||
" -c Configuration file (default " DIGWATCH_SOURCE_CONF_FILE ", " DIGWATCH_INSTALL_CONF_FILE ")\n"
|
||||
" -c Configuration file (default " FALCO_SOURCE_CONF_FILE ", " FALCO_INSTALL_CONF_FILE ")\n"
|
||||
" -o Output type (options are 'stdout', 'syslog', default is 'stdout')\n"
|
||||
" -e <events_file> Read the events from <events_file> (in .scap format) instead of tapping into live.\n"
|
||||
" -r <rules_file> Rules file (defaults to value set in configuration file, or /etc/falco_rules.conf).\n"
|
||||
@ -195,7 +195,7 @@ int digwatch_init(int argc, char **argv)
|
||||
string scap_filename;
|
||||
string conf_filename;
|
||||
string rules_filename;
|
||||
string lua_dir = DIGWATCH_LUA_DIR;
|
||||
string lua_dir = FALCO_LUA_DIR;
|
||||
lua_State* ls = NULL;
|
||||
|
||||
static struct option long_options[] =
|
||||
@ -261,17 +261,17 @@ int digwatch_init(int argc, char **argv)
|
||||
}
|
||||
else
|
||||
{
|
||||
conf_stream = new ifstream(DIGWATCH_SOURCE_CONF_FILE);
|
||||
conf_stream = new ifstream(FALCO_SOURCE_CONF_FILE);
|
||||
if (conf_stream->good())
|
||||
{
|
||||
conf_filename = DIGWATCH_SOURCE_CONF_FILE;
|
||||
conf_filename = FALCO_SOURCE_CONF_FILE;
|
||||
}
|
||||
else
|
||||
{
|
||||
conf_stream = new ifstream(DIGWATCH_INSTALL_CONF_FILE);
|
||||
conf_stream = new ifstream(FALCO_INSTALL_CONF_FILE);
|
||||
if (conf_stream->good())
|
||||
{
|
||||
conf_filename = DIGWATCH_INSTALL_CONF_FILE;
|
||||
conf_filename = FALCO_INSTALL_CONF_FILE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -298,15 +298,15 @@ int digwatch_init(int argc, char **argv)
|
||||
config.m_rules_filename = rules_filename;
|
||||
}
|
||||
|
||||
lua_main_filename = lua_dir + DIGWATCH_LUA_MAIN;
|
||||
lua_main_filename = lua_dir + FALCO_LUA_MAIN;
|
||||
if (!std::ifstream(lua_main_filename))
|
||||
{
|
||||
lua_dir = DIGWATCH_SOURCE_LUA_DIR;
|
||||
lua_main_filename = lua_dir + DIGWATCH_LUA_MAIN;
|
||||
lua_dir = FALCO_SOURCE_LUA_DIR;
|
||||
lua_main_filename = lua_dir + FALCO_LUA_MAIN;
|
||||
if (!std::ifstream(lua_main_filename))
|
||||
{
|
||||
digwatch_logger::log(LOG_ERR, "Could not find Falco Lua libraries (tried " +
|
||||
string(DIGWATCH_LUA_DIR DIGWATCH_LUA_MAIN) + ", " +
|
||||
string(FALCO_LUA_DIR FALCO_LUA_MAIN) + ", " +
|
||||
lua_main_filename + "). Exiting \n");
|
||||
result = EXIT_FAILURE;
|
||||
goto exit;
|
||||
|
Loading…
Reference in New Issue
Block a user