diff --git a/utils/apparmor/regex.py b/utils/apparmor/regex.py index 1b43b3ca8..1c78df37a 100644 --- a/utils/apparmor/regex.py +++ b/utils/apparmor/regex.py @@ -141,9 +141,10 @@ def parse_profile_start_line(line, filename): return result -RE_ABI = re.compile('^\s*#?abi\s*(<(?P.*)>|"(?P.*)"|(?P[^<>"]*))' + RE_COMMA_EOL) +RE_MAGIC_OR_QUOTED_PATH = '(<(?P.*)>|"(?P.*)"|(?P[^<>"]*))' +RE_ABI = re.compile('^\s*#?abi\s*' + RE_MAGIC_OR_QUOTED_PATH + RE_COMMA_EOL) +RE_INCLUDE = re.compile('^\s*#?include(?P\s+if\s+exists)?\s*' + RE_MAGIC_OR_QUOTED_PATH + RE_EOL) -RE_INCLUDE = re.compile('^\s*#?include(?P\s+if\s+exists)?\s*(<(?P.*)>|"(?P.*)"|(?P[^<>"]*))' + RE_EOL) def re_match_include_parse(line): '''Matches the path for include or include if exists.