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@xxxxxxxxxx> --- python/sepolgen/src/sepolgen/refpolicy.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/sepolgen/src/sepolgen/refpolicy.py b/python/sepolgen/src/sepolgen/refpolicy.py index 352b1878..a262e1c5 100644 --- a/python/sepolgen/src/sepolgen/refpolicy.py +++ b/python/sepolgen/src/sepolgen/refpolicy.py @@ -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 -- 2.14.4 _______________________________________________ Selinux mailing list Selinux@xxxxxxxxxxxxx To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.