mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 22:05:27 +00:00
Allow empty source and any word only in mount source
This commit is contained in:
@@ -71,13 +71,13 @@ glob_pattern = (
|
|||||||
+ RE_PROFILE_PATH_OR_VAR % 'IGNOREDEV' # path or variable
|
+ RE_PROFILE_PATH_OR_VAR % 'IGNOREDEV' # path or variable
|
||||||
+ r'|\{\S*|"\{[^"]*"' # alternation, optionally quoted (note: no leading "/" needed/enforced)
|
+ r'|\{\S*|"\{[^"]*"' # alternation, optionally quoted (note: no leading "/" needed/enforced)
|
||||||
+ r'|\*\*\S*|\*\*[^"]*"' # starting with "**"
|
+ r'|\*\*\S*|\*\*[^"]*"' # starting with "**"
|
||||||
+ r'|""' # empty source
|
|
||||||
+ r'|[\w-]+' # any word including "-"
|
|
||||||
# Note: the closing ')))' needs to be added in the final regex
|
# Note: the closing ')))' needs to be added in the final regex
|
||||||
)
|
)
|
||||||
|
|
||||||
source_fileglob_pattern = (
|
source_fileglob_pattern = (
|
||||||
glob_pattern % 'source_file'
|
glob_pattern % 'source_file'
|
||||||
|
+ r'|""' # empty source
|
||||||
|
+ r'|[\w-]+' # any word including "-"
|
||||||
+ ')))'
|
+ ')))'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user