summaryrefslogtreecommitdiff
path: root/lib/python2.7/site-packages/setools/policyrep/rbacrule.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python2.7/site-packages/setools/policyrep/rbacrule.py')
-rwxr-xr-x[-rw-r--r--]lib/python2.7/site-packages/setools/policyrep/rbacrule.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/python2.7/site-packages/setools/policyrep/rbacrule.py b/lib/python2.7/site-packages/setools/policyrep/rbacrule.py
index d327775..e923162 100644..100755
--- a/lib/python2.7/site-packages/setools/policyrep/rbacrule.py
+++ b/lib/python2.7/site-packages/setools/policyrep/rbacrule.py
@@ -45,12 +45,12 @@ def expanded_rbac_rule_factory(original, source, target):
target The target type of the expanded rule.
"""
- if isinstance(original, RoleAllow):
+ if isinstance(original, (ExpandedRoleAllow, ExpandedRoleTransition)):
+ return original
+ elif isinstance(original, RoleAllow):
rule = ExpandedRoleAllow(original.policy, original.qpol_symbol)
elif isinstance(original, RoleTransition):
rule = ExpandedRoleTransition(original.policy, original.qpol_symbol)
- elif isinstance(original, (ExpandedRoleAllow, ExpandedRoleTransition)):
- return original
else:
raise TypeError("The original rule must be an RBAC rule class.")