2
0
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:
Christian Boltz
2015-05-09 01:09:08 +02:00
parent 257bc75aa1
commit 7167632350
2 changed files with 7 additions and 2 deletions

View File

@@ -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 }),