mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-18 12:14:33 +00:00
python/sepolgen: print all AV rules correctly
In refpolicy module, in AVRule.__rule_type_str() method, self.rule_type was not checked for value self.NEVERALLOW so that string "neverallow" was never returned. Fix this by checking all four possible values and returning correct strings. Signed-off-by: Jan Zarsky <jzarsky@redhat.com>
This commit is contained in:
parent
416900cb11
commit
a98314d8c1
@ -472,8 +472,10 @@ class AVRule(Leaf):
|
||||
return "allow"
|
||||
elif self.rule_type == self.DONTAUDIT:
|
||||
return "dontaudit"
|
||||
else:
|
||||
elif self.rule_type == self.AUDITALLOW:
|
||||
return "auditallow"
|
||||
elif self.rule_type == self.NEVERALLOW:
|
||||
return "neverallow"
|
||||
|
||||
def from_av(self, av):
|
||||
"""Add the access from an access vector to this allow
|
||||
|
Loading…
Reference in New Issue
Block a user