All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] python/sepolicy: search() for dontaudit rules as well
@ 2018-09-18 13:44 Petr Lautrbach
  0 siblings, 0 replies; only message in thread
From: Petr Lautrbach @ 2018-09-18 13:44 UTC (permalink / raw)
  To: selinux

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 --git a/python/sepolicy/sepolicy/__init__.py b/python/sepolicy/sepol=
icy/__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=3DNone):
         tertypes.append(NEVERALLOW)
     if AUDITALLOW in types:
         tertypes.append(AUDITALLOW)
+    if DONTAUDIT in types:
+        tertypes.append(DONTAUDIT)
=20
     if len(tertypes) > 0:
         q =3D setools.TERuleQuery(_pol,
--=20
2.19.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-09-18 13:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-18 13:44 [PATCH] python/sepolicy: search() for dontaudit rules as well Petr Lautrbach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.