landlock: Refactor merge/inherit_ruleset helpers
authorKonstantin Meskhidze <konstantin.meskhidze@huawei.com>
Thu, 26 Oct 2023 01:47:43 +0000 (09:47 +0800)
committerMickaël Salaün <mic@digikod.net>
Thu, 26 Oct 2023 19:07:12 +0000 (21:07 +0200)
commit6146b6141770206792d0e1155794cc48697c7985
tree019e923c6287b21900b3de0f802cc02506b180ad
parenta4ac404b3032562ed6a34232b5266d0f446dd799
landlock: Refactor merge/inherit_ruleset helpers

Refactor merge_ruleset() and inherit_ruleset() functions to support new
rule types. Add merge_tree() and inherit_tree() helpers.  They use a
specific ruleset's red-black tree according to a key type argument.

Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze@huawei.com>
Link: https://lore.kernel.org/r/20231026014751.414649-5-konstantin.meskhidze@huawei.com
Signed-off-by: Mickaël Salaün <mic@digikod.net>
security/landlock/ruleset.c