Skip to contentSkip to conversation

python/sepolicy: search() also for dontaudit rules

PATCH In review Petr Lautrbach 2 participants 3 messages Dec 12, 2018 – Dec 18, 2018 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python/sepolicy: search() also for dontaudit rules

dontaudit rules were accidentally dropped during rewrite to SETools 4 API in 97d5f6a2

Fixes:

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

import sepolicy
sepolicy.search(['dontaudit'])

[]

---

Same patch as https://lore.kernel.org/selinux/[email protected]/
but with a slightly reworded commit message

 python/sepolicy/sepolicy/__init__.py | 2 ++
 1 file changed, 2 insertions(+)
python/sepolicy/sepolicy/__init__.py +2 -0
index cd7af7cf..fbeb731d 100644
@@ -344,6 +344,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,
Signature · 1 line
2.19.2
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Petr Lautrbach

dontaudit rules were accidentally dropped during rewrite to SETools 4 API in 97d5f6a2

Fixes:

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

import sepolicy
sepolicy.search(['dontaudit'])

[]

Quoted 24 lines

---

Same patch as https://lore.kernel.org/selinux/[email protected]/
but with a slightly reworded commit message

 python/sepolicy/sepolicy/__init__.py | 2 ++
 1 file changed, 2 insertions(+)
python/sepolicy/sepolicy/__init__.py +2 -1
index cd7af7cf..fbeb731d 100644
@@ -344,6 +344,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,
--

2.19.2

#2 lore raw
Quoted 5 lines · Nicolas Iooss
Quoted 4 lines · Petr Lautrbach

dontaudit rules were accidentally dropped during rewrite to SETools 4 API in 97d5f6a2

Quoted 9 lines
Quoted 6 lines

Fixes:

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

import sepolicy
sepolicy.search(['dontaudit'])

[]

Merged.

Quoted 24 lines
Quoted 24 lines

---

Same patch as https://lore.kernel.org/selinux/[email protected]/
but with a slightly reworded commit message

 python/sepolicy/sepolicy/__init__.py | 2 ++
 1 file changed, 2 insertions(+)
python/sepolicy/sepolicy/__init__.py +2 -1
index cd7af7cf..fbeb731d 100644
@@ -344,6 +344,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,
--

2.19.2