mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 14:25:52 +00:00
Split off RE_PROFILE_NAME and RE_PROFILE_PATH from RE_PROFILE_START
(might get re-used later ;-) Also add two tests for profile names not starting with / - the quoted version wasn't catched as invalid before, so this change is actually also a bugfix. Acked-by: Steve Beattie <steve@nxnw.org> for trunk and 2.9.
This commit is contained in:
@@ -403,6 +403,8 @@ class AANamedRegexProfileStart_2(AANamedRegexTest):
|
||||
('/bin/foo /bin/bar', False), # missing 'profile' keyword
|
||||
('profile {', False), # no attachment
|
||||
(' profile foo bar /foo {', False), # missing quotes around "foo bar"
|
||||
('bin/foo {', False), # not starting with '/'
|
||||
('"bin/foo" {', False), # not starting with '/', quoted version
|
||||
|
||||
(' /foo {', { 'plainprofile': '/foo', 'namedprofile': None, 'attachment': None, 'flags': None, 'comment': None }),
|
||||
(' "/foo" {', { 'plainprofile': '"/foo"', 'namedprofile': None, 'attachment': None, 'flags': None, 'comment': None }),
|
||||
|
Reference in New Issue
Block a user