diff mbox series

python/sepolicy: search() for dontaudit rules as well

Message ID 20180918134401.22956-1-plautrba@redhat.com (mailing list archive)
State Not Applicable
Headers show
Series python/sepolicy: search() for dontaudit rules as well | expand

Commit Message

Petr Lautrbach Sept. 18, 2018, 1:44 p.m. UTC
dontaudit rules were accidentally dropped during rewrite to SETools 4 API in
97d5f6a2

Fixes:
>>> import sepolicy
>>> sepolicy.search(['dontaudit'])
[]

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
---
 python/sepolicy/sepolicy/__init__.py | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/python/sepolicy/sepolicy/__init__.py b/python/sepolicy/sepolicy/__init__.py
index 89346aba..c1a60798 100644
--- a/python/sepolicy/sepolicy/__init__.py
+++ b/python/sepolicy/sepolicy/__init__.py
@@ -334,6 +334,8 @@  def search(types, seinfo=None):
         tertypes.append(NEVERALLOW)
     if AUDITALLOW in types:
         tertypes.append(AUDITALLOW)
+    if DONTAUDIT in types:
+        tertypes.append(DONTAUDIT)
 
     if len(tertypes) > 0:
         q = setools.TERuleQuery(_pol,