From 0f660828e1aeaaffe3532a3173cc7cd623bb10ab Mon Sep 17 00:00:00 2001 From: John Johansen Date: Wed, 5 Jul 2023 03:37:03 -0700 Subject: [PATCH] parser: add rule merging for ptrace rules Signed-off-by: John Johansen --- parser/ptrace.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/parser/ptrace.h b/parser/ptrace.h index 89881de91..b129c5795 100644 --- a/parser/ptrace.h +++ b/parser/ptrace.h @@ -52,6 +52,16 @@ public: return true; }; + virtual bool is_mergeable(void) { return true; } + virtual int cmp(rule_t const &rhs) const + { + int res = perms_rule_t::cmp(rhs); + if (res) + return res; + return null_strcmp(peer_label, + (rule_cast(rhs)).peer_label); + }; + protected: virtual void warn_once(const char *name) override; };