mirror of
https://github.com/SELinuxProject/setools
synced 2025-02-24 08:07:03 +00:00
Fix missed swig wrapper rebasing.
This commit is contained in:
parent
55519fa83b
commit
5909bde15e
@ -54,7 +54,7 @@ class Context(symbol.PolicySymbol):
|
|||||||
"""The MLS portion (range) of the context."""
|
"""The MLS portion (range) of the context."""
|
||||||
|
|
||||||
# without this check, qpol will segfault on MLS-disabled policies
|
# without this check, qpol will segfault on MLS-disabled policies
|
||||||
if self.policy.has_capability(qpol.QPOL_CAP_MLS):
|
if self.policy.capability(qpol.QPOL_CAP_MLS):
|
||||||
return mls.MLSRange(self.policy, self.qpol_symbol.range(self.policy))
|
return mls.MLSRange(self.policy, self.qpol_symbol.range(self.policy))
|
||||||
else:
|
else:
|
||||||
raise mls.MLSDisabled("MLS is disabled, the context has no range.")
|
raise mls.MLSDisabled("MLS is disabled, the context has no range.")
|
||||||
|
@ -58,7 +58,7 @@ class MLSCategory(symbol.PolicySymbol):
|
|||||||
aiter = self.qpol_symbol.alias_iter(self.policy)
|
aiter = self.qpol_symbol.alias_iter(self.policy)
|
||||||
while not aiter.isend():
|
while not aiter.isend():
|
||||||
yield qpol.to_str(aiter.item())
|
yield qpol.to_str(aiter.item())
|
||||||
aiter.next()
|
aiter.next_()
|
||||||
|
|
||||||
# libqpol does not expose sensitivities as an individual component
|
# libqpol does not expose sensitivities as an individual component
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ class MLSLevel(symbol.PolicySymbol):
|
|||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
if self.policy == other.policy:
|
if self.policy == other.policy:
|
||||||
if (self.qpol_symbol.sens_name(self.policy) != other.qpol_symbol.get_sens_name(self.policy)):
|
if (self.qpol_symbol.sens_name(self.policy) != other.qpol_symbol.sens_name(self.policy)):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
selfcats = set(str(c) for c in self.categories())
|
selfcats = set(str(c) for c in self.categories())
|
||||||
@ -113,7 +113,7 @@ class MLSLevel(symbol.PolicySymbol):
|
|||||||
citer = self.qpol_symbol.cat_iter(self.policy)
|
citer = self.qpol_symbol.cat_iter(self.policy)
|
||||||
while not citer.isend():
|
while not citer.isend():
|
||||||
yield MLSCategory(self.policy, qpol.qpol_cat_from_void(citer.item()))
|
yield MLSCategory(self.policy, qpol.qpol_cat_from_void(citer.item()))
|
||||||
citer.next()
|
citer.next_()
|
||||||
|
|
||||||
|
|
||||||
class MLSRange(symbol.PolicySymbol):
|
class MLSRange(symbol.PolicySymbol):
|
||||||
|
Loading…
Reference in New Issue
Block a user