mirror of
https://github.com/falcosecurity/falco.git
synced 2025-08-12 11:32:39 +00:00
chore(userspace/engine): cleanup unused alternate-lua-dir option and remove config_falco_engine.h.in, now unused since lua scripts are embedded in Falco.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
parent
c49093005d
commit
8d9dd4440f
@ -56,6 +56,3 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(falco_engine "${FALCO_SINSP_LIBRARY}" "${LPEG_LIB}" "${LYAML_LIB}" "${LIBYAML_LIB}" luafiles)
|
target_link_libraries(falco_engine "${FALCO_SINSP_LIBRARY}" "${LPEG_LIB}" "${LYAML_LIB}" "${LIBYAML_LIB}" luafiles)
|
||||||
|
|
||||||
configure_file(config_falco_engine.h.in config_falco_engine.h)
|
|
||||||
|
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright (C) 2019 The Falco Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#define FALCO_ENGINE_LUA_DIR "${FALCO_ABSOLUTE_SHARE_DIR}/lua/"
|
|
||||||
#define FALCO_ENGINE_SOURCE_LUA_DIR "${PROJECT_SOURCE_DIR}/userspace/engine/lua/"
|
|
@ -16,7 +16,6 @@ limitations under the License.
|
|||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
#include "config_falco_engine.h"
|
|
||||||
#include "falco_common.h"
|
#include "falco_common.h"
|
||||||
#include "banned.h" // This raises a compilation error when certain functions are used
|
#include "banned.h" // This raises a compilation error when certain functions are used
|
||||||
#include "falco_engine_lua_files.hh"
|
#include "falco_engine_lua_files.hh"
|
||||||
|
@ -25,7 +25,6 @@ limitations under the License.
|
|||||||
#include "falco_engine.h"
|
#include "falco_engine.h"
|
||||||
#include "falco_utils.h"
|
#include "falco_utils.h"
|
||||||
#include "falco_engine_version.h"
|
#include "falco_engine_version.h"
|
||||||
#include "config_falco_engine.h"
|
|
||||||
|
|
||||||
#include "formats.h"
|
#include "formats.h"
|
||||||
|
|
||||||
@ -44,7 +43,7 @@ const std::string falco_engine::s_default_ruleset = "falco-default-ruleset";
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
falco_engine::falco_engine(bool seed_rng, const std::string& alternate_lua_dir)
|
falco_engine::falco_engine(bool seed_rng)
|
||||||
: m_next_ruleset_id(0),
|
: m_next_ruleset_id(0),
|
||||||
m_min_priority(falco_common::PRIORITY_DEBUG),
|
m_min_priority(falco_common::PRIORITY_DEBUG),
|
||||||
m_sampling_ratio(1), m_sampling_multiplier(0),
|
m_sampling_ratio(1), m_sampling_multiplier(0),
|
||||||
|
@ -32,7 +32,6 @@ limitations under the License.
|
|||||||
#include "rules.h"
|
#include "rules.h"
|
||||||
#include "ruleset.h"
|
#include "ruleset.h"
|
||||||
|
|
||||||
#include "config_falco_engine.h"
|
|
||||||
#include "falco_common.h"
|
#include "falco_common.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -44,7 +43,7 @@ limitations under the License.
|
|||||||
class falco_engine : public falco_common
|
class falco_engine : public falco_common
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
falco_engine(bool seed_rng=true, const std::string& alternate_lua_dir=FALCO_ENGINE_SOURCE_LUA_DIR);
|
falco_engine(bool seed_rng=true);
|
||||||
virtual ~falco_engine();
|
virtual ~falco_engine();
|
||||||
|
|
||||||
// A given engine has a version which identifies the fields
|
// A given engine has a version which identifies the fields
|
||||||
|
@ -94,7 +94,6 @@ static void usage()
|
|||||||
" -h, --help Print this page\n"
|
" -h, --help Print this page\n"
|
||||||
" -c Configuration file (default " FALCO_SOURCE_CONF_FILE ", " FALCO_INSTALL_CONF_FILE ")\n"
|
" -c Configuration file (default " FALCO_SOURCE_CONF_FILE ", " FALCO_INSTALL_CONF_FILE ")\n"
|
||||||
" -A Monitor all events, including those with EF_DROP_SIMPLE_CONS flag.\n"
|
" -A Monitor all events, including those with EF_DROP_SIMPLE_CONS flag.\n"
|
||||||
" --alternate-lua-dir <path> Specify an alternate path for loading Falco lua files\n"
|
|
||||||
" -b, --print-base64 Print data buffers in base64.\n"
|
" -b, --print-base64 Print data buffers in base64.\n"
|
||||||
" This is useful for encoding binary data that needs to be used over media designed to.\n"
|
" This is useful for encoding binary data that needs to be used over media designed to.\n"
|
||||||
" --cri <path> Path to CRI socket for container metadata.\n"
|
" --cri <path> Path to CRI socket for container metadata.\n"
|
||||||
@ -567,7 +566,6 @@ int falco_init(int argc, char **argv)
|
|||||||
|
|
||||||
static struct option long_options[] =
|
static struct option long_options[] =
|
||||||
{
|
{
|
||||||
{"alternate-lua-dir", required_argument, 0},
|
|
||||||
{"cri", required_argument, 0},
|
{"cri", required_argument, 0},
|
||||||
{"daemon", no_argument, 0, 'd'},
|
{"daemon", no_argument, 0, 'd'},
|
||||||
{"disable-cri-async", no_argument, 0, 0},
|
{"disable-cri-async", no_argument, 0, 0},
|
||||||
@ -598,8 +596,7 @@ int falco_init(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
set<string> disabled_rule_substrings;
|
set<string> disabled_rule_substrings;
|
||||||
string substring;
|
string substring;
|
||||||
string all_rules = "";
|
string all_rules;
|
||||||
string alternate_lua_dir = FALCO_ENGINE_SOURCE_LUA_DIR;
|
|
||||||
set<string> disabled_rule_tags;
|
set<string> disabled_rule_tags;
|
||||||
set<string> enabled_rule_tags;
|
set<string> enabled_rule_tags;
|
||||||
|
|
||||||
@ -792,16 +789,6 @@ int falco_init(int argc, char **argv)
|
|||||||
disable_sources.insert(optarg);
|
disable_sources.insert(optarg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (string(long_options[long_index].name)== "alternate-lua-dir")
|
|
||||||
{
|
|
||||||
if(optarg != NULL)
|
|
||||||
{
|
|
||||||
alternate_lua_dir = optarg;
|
|
||||||
if (alternate_lua_dir.back() != '/') {
|
|
||||||
alternate_lua_dir += '/';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -837,7 +824,7 @@ int falco_init(int argc, char **argv)
|
|||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
engine = new falco_engine(true, alternate_lua_dir);
|
engine = new falco_engine(true);
|
||||||
engine->set_extra(output_format, replace_container_info);
|
engine->set_extra(output_format, replace_container_info);
|
||||||
|
|
||||||
// Create "factories" that can create filters/formatters for
|
// Create "factories" that can create filters/formatters for
|
||||||
|
Loading…
Reference in New Issue
Block a user