diff --git a/userspace/engine/rule_loader.cpp b/userspace/engine/rule_loader.cpp index ba7f686d..ae3bdc39 100644 --- a/userspace/engine/rule_loader.cpp +++ b/userspace/engine/rule_loader.cpp @@ -413,18 +413,6 @@ void rule_loader::append(configuration& cfg, list_info& info) void rule_loader::define(configuration& cfg, macro_info& info) { - if (!cfg.sources.at(info.source)) - { - cfg.warnings.push_back("Macro " + info.name - + ": warning (unknown-source): unknown source " - + info.source + ", skipping"); - return; - } - - auto prev = m_macro_infos.at(info.name); - THROW(prev && prev->source != info.source, - "Macro " + info.name + " has been re-defined with a different source"); - define_info(m_macro_infos, info, m_cur_index++); } @@ -566,7 +554,6 @@ void rule_loader::compile_macros_infos( indexed_vector& lists, indexed_vector& out) const { - set used; const context* info_ctx = NULL; try { diff --git a/userspace/engine/rule_loader.h b/userspace/engine/rule_loader.h index 47bb2c27..3dae2c2b 100644 --- a/userspace/engine/rule_loader.h +++ b/userspace/engine/rule_loader.h @@ -122,7 +122,6 @@ public: size_t visibility; std::string name; std::string cond; - std::string source; std::shared_ptr cond_ast; }; diff --git a/userspace/engine/rule_reader.cpp b/userspace/engine/rule_reader.cpp index 27e60ba5..e0993103 100644 --- a/userspace/engine/rule_reader.cpp +++ b/userspace/engine/rule_reader.cpp @@ -207,12 +207,10 @@ static void read_item( rule_loader::macro_info v; v.ctx = ctx; bool append = false; - v.source = falco_common::syscall_source; THROW(!decode_val(item["macro"], v.name) || v.name.empty(), "Macro name is empty"); THROW(!decode_val(item["condition"], v.cond) || v.cond.empty(), "Macro must have property condition"); - decode_val(item["source"], v.source); if(decode_val(item["append"], append) && append) { loader.append(cfg, v);