mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 18:17:09 +00:00
Expand nested (...) in glob_pattern
This duplicates a few bytes, but makes the regex easier to read.
This commit is contained in:
parent
bf2054d963
commit
c1712c882c
@ -66,7 +66,7 @@ mount_condition_pattern = rf'({fs_type_pattern})?\s*({option_pattern})?'
|
||||
# - A path : /foo
|
||||
# - A globbed Path : **
|
||||
|
||||
glob_pattern = r'(\s*(?P<%s>(([/{]|\*\*)\S*|"([/{]|\*\*)[^"]*"|@{\S+}\S*|"@{\S+}[^"]*"|"")|\w+))'
|
||||
glob_pattern = r'(\s*(?P<%s>([/{]\S*|\*\*\S*|"[/{][^"]*"|\*\*[^"]*"|@{\S+}\S*|"@{\S+}[^"]*"|"")|\w+))'
|
||||
source_fileglob_pattern = glob_pattern % 'source_file'
|
||||
dest_fileglob_pattern = glob_pattern % 'dest_file'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user