2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-09-05 08:45:22 +00:00

extend re_match_include_parse() to also match abi rules

... and add some tests
This commit is contained in:
Christian Boltz
2020-05-09 00:35:10 +02:00
parent b96fd81184
commit 8ca486715f
3 changed files with 56 additions and 12 deletions

View File

@@ -68,7 +68,7 @@ class IncludeRule(BaseRule):
comment = parse_comment(matches)
# TODO: move re_match_include_parse() from regex.py to this class after converting all code to use IncludeRule
path, ifexists, ismagic = re_match_include_parse(raw_rule)
path, ifexists, ismagic = re_match_include_parse(raw_rule, cls.rule_name)
return IncludeRule(path, ifexists, ismagic,
audit=False, deny=False, allow_keyword=False, comment=comment)