2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

[38/38] Drop old path regexes

FileRule uses RE_PROFILE_FILE_ENTRY, which also means
RE_PROFILE_PATH_ENTRY, RE_PROFILE_BARE_FILE_ENTRY and RE_OWNER are now
unused.

This patch drops these regexes and their tests in test-regex_matches.py.


Acked-by: Steve Beattie <steve@nxnw.org>
This commit is contained in:
Christian Boltz
2016-10-01 20:16:36 +02:00
parent 5dbb283af5
commit 7aca12bb12
2 changed files with 0 additions and 43 deletions

View File

@@ -15,7 +15,6 @@ from common_test import AATest, setup_all_loops
from apparmor.common import AppArmorBug, AppArmorException
from apparmor.regex import ( strip_parenthesis, strip_quotes, parse_profile_start_line, re_match_include,
RE_PROFILE_BARE_FILE_ENTRY, RE_PROFILE_PATH_ENTRY,
RE_PROFILE_START, RE_PROFILE_DBUS, RE_PROFILE_CAP, RE_PROFILE_PTRACE, RE_PROFILE_SIGNAL )
@@ -216,44 +215,6 @@ class AARegexCapability(AARegexTest):
(' capabilitynet_raw,', False)
]
class AARegexPath(AARegexTest):
'''Tests for RE_PROFILE_PATH_ENTRY'''
def AASetup(self):
self.regex = RE_PROFILE_PATH_ENTRY
tests = [
(' /tmp/foo r,',
(None, None, None, None, '/tmp/foo', 'r', None, None, None)),
(' audit /tmp/foo rw,',
('audit', None, None, None, '/tmp/foo', 'rw', None, None, None)),
(' audit deny /tmp/foo rw,',
('audit', 'deny', None, None, '/tmp/foo', 'rw', None, None, None)),
(' file /tmp/foo rw,',
(None, None, None, 'file', '/tmp/foo', 'rw', None, None, None)),
(' file,', False),
]
class AARegexBareFile(AARegexTest):
'''Tests for RE_PROFILE_BARE_FILE_ENTRY'''
def AASetup(self):
self.regex = RE_PROFILE_BARE_FILE_ENTRY
tests = [
(' file,', (None, None, None, None)),
(' dbus,', False),
(' file /tmp/foo rw,', False),
(' file /tmp/foo,', False),
(' file r,', False),
(' owner file , ', (None, None, 'owner', None)),
(' audit owner file , ', ('audit', None, 'owner', None)),
(' deny file , ', (None, 'deny', None, None)),
]
class AARegexDbus(AARegexTest):
'''Tests for RE_PROFILE_DBUS'''