mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-31 22:16:49 +00:00
update(userspace/engine): convert engine version to semver string
Signed-off-by: Lorenzo Susini <susinilorenzo1@gmail.com>
This commit is contained in:
parent
d3e1a1f746
commit
cd6cb14c08
@ -75,9 +75,9 @@ falco_engine::~falco_engine()
|
|||||||
m_sources.clear();
|
m_sources.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t falco_engine::engine_version()
|
std::string falco_engine::engine_version()
|
||||||
{
|
{
|
||||||
return (uint32_t) FALCO_ENGINE_VERSION;
|
return FALCO_ENGINE_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
const falco_source* falco_engine::find_source(const std::string& name) const
|
const falco_source* falco_engine::find_source(const std::string& name) const
|
||||||
@ -567,7 +567,7 @@ void falco_engine::describe_rule(std::string *rule, const std::vector<std::share
|
|||||||
|
|
||||||
// Store required engine version
|
// Store required engine version
|
||||||
auto required_engine_version = m_rule_collector.required_engine_version();
|
auto required_engine_version = m_rule_collector.required_engine_version();
|
||||||
output["required_engine_version"] = std::to_string(required_engine_version.version);
|
output["required_engine_version"] = required_engine_version.version;
|
||||||
|
|
||||||
// Store required plugin versions
|
// Store required plugin versions
|
||||||
Json::Value plugin_versions = Json::arrayValue;
|
Json::Value plugin_versions = Json::arrayValue;
|
||||||
|
@ -56,7 +56,7 @@ public:
|
|||||||
// and rules file format it supports. This version will change
|
// and rules file format it supports. This version will change
|
||||||
// any time the code that handles rules files, expression
|
// any time the code that handles rules files, expression
|
||||||
// fields, etc, changes.
|
// fields, etc, changes.
|
||||||
static uint32_t engine_version();
|
static std::string engine_version();
|
||||||
|
|
||||||
// Print to stdout (using printf) a description of each field supported by this engine.
|
// Print to stdout (using printf) a description of each field supported by this engine.
|
||||||
// If source is non-empty, only fields for the provided source are printed.
|
// If source is non-empty, only fields for the provided source are printed.
|
||||||
|
@ -16,7 +16,11 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// The version of this Falco engine.
|
// The version of this Falco engine.
|
||||||
#define FALCO_ENGINE_VERSION (26)
|
#define FALCO_ENGINE_VERSION "0.26.0"
|
||||||
|
|
||||||
|
// Default version values assumed when parsing numeric required_engine_version
|
||||||
|
#define FALCO_DEFAULT_ENGINE_MAJOR 0
|
||||||
|
#define FALCO_DEFAULT_ENGINE_PATCH 0
|
||||||
|
|
||||||
// This is the result of running the following command:
|
// This is the result of running the following command:
|
||||||
// FALCO="falco -c ./falco.yaml"
|
// FALCO="falco -c ./falco.yaml"
|
||||||
|
Loading…
Reference in New Issue
Block a user