mirror of
https://github.com/SELinuxProject/setools
synced 2025-01-30 19:51:39 +00:00
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:
parent
47b7e25562
commit
f6dc7c3cf8
@ -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
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user