2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-29 13:28:19 +00:00

Allow empty source and any word only in mount source

This commit is contained in:
Christian Boltz 2025-03-11 21:51:42 +01:00
parent 537fec8b36
commit ae20b62c31
No known key found for this signature in database
GPG Key ID: C6A682EA63C82F1C

View File

@ -71,13 +71,13 @@ glob_pattern = (
+ RE_PROFILE_PATH_OR_VAR % 'IGNOREDEV' # path or variable
+ r'|\{\S*|"\{[^"]*"' # alternation, optionally quoted (note: no leading "/" needed/enforced)
+ r'|\*\*\S*|\*\*[^"]*"' # starting with "**"
+ r'|""' # empty source
+ r'|[\w-]+' # any word including "-"
# Note: the closing ')))' needs to be added in the final regex
)
source_fileglob_pattern = (
glob_pattern % 'source_file'
+ r'|""' # empty source
+ r'|[\w-]+' # any word including "-"
+ ')))'
)