mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-08 18:19:30 +00:00
When overriding rules, ensure that the sources match
In places where a second rule definition might replace, append to, or replace items from a base rule, ensure that the source of the second rule definiton matches the first. This already existed for defines, but for other changes. There was a bug where a second definition might exist for a different source, but the additional rule was used anyway. This now returns the same error for these other changes e.g. "Rule has been re-defined..." as define. Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
@@ -97,6 +97,9 @@ public:
|
||||
virtual void selective_replace(configuration& cfg, rule_update_info& info);
|
||||
|
||||
private:
|
||||
template<typename ruleInfo>
|
||||
rule_info* find_prev_rule(ruleInfo& info);
|
||||
|
||||
uint32_t m_cur_index;
|
||||
indexed_vector<rule_info> m_rule_infos;
|
||||
indexed_vector<macro_info> m_macro_infos;
|
||||
|
Reference in New Issue
Block a user