2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-22 10:07:12 +00:00

parser: add rule merging for ptrace rules

Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
John Johansen 2023-07-05 03:37:03 -07:00
parent fd20c226e0
commit 0f660828e1

View File

@ -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<ptrace_rule const &>(rhs)).peer_label);
};
protected:
virtual void warn_once(const char *name) override;
};