MatchPermission: Change to use CriteriaPermissionSetDescriptor.

Fix common query test policy to meet new permission validations.

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
This commit is contained in:
Chris PeBenito 2020-08-22 18:42:39 -04:00
parent 47b7e25562
commit f6dc7c3cf8
2 changed files with 10 additions and 2 deletions

View File

@ -20,7 +20,7 @@
# pylint: disable=attribute-defined-outside-init,no-member # pylint: disable=attribute-defined-outside-init,no-member
import re import re
from .descriptors import CriteriaDescriptor, CriteriaSetDescriptor from .descriptors import CriteriaDescriptor, CriteriaSetDescriptor, CriteriaPermissionSetDescriptor
from .util import match_in_set, match_regex, match_range, match_regex_or_set from .util import match_in_set, match_regex, match_range, match_regex_or_set
@ -193,7 +193,7 @@ class MatchPermission:
"""Mixin for matching an object's permissions.""" """Mixin for matching an object's permissions."""
perms = CriteriaSetDescriptor("perms_regex") perms = CriteriaPermissionSetDescriptor(name_regex="perms_regex")
perms_equal = False perms_equal = False
perms_regex = False perms_regex = False
perms_subset = False perms_subset = False

View File

@ -1,4 +1,6 @@
class infoflow class infoflow
class null
class rw
sid kernel sid kernel
sid security sid security
@ -63,6 +65,12 @@ common test12b
class infoflow class infoflow
inherits test1 inherits test1
class null
inherits test10a
class rw
inherits test11a
sensitivity low_s; sensitivity low_s;
sensitivity medium_s alias med; sensitivity medium_s alias med;
sensitivity high_s; sensitivity high_s;