[PATCH] python/sepolicy: generate: drop or merge symbol table overwrites

Stephen Smalley <[email protected]>
Newsgroups org.kernel.vger.selinux
Message-ID <[email protected]>
self.symbols["openlog"] is assigned three times with only the last
one (set_use_syslog) surviving. Drop the first two since they
do not appear to be relevant to logging.

self.symbols["pam_"] is assigned twice so combine the two definitions
so that a PAM-linked binary sets both use_pam and use_audit.

Signed-off-by: Stephen Smalley <[email protected]>
---
 python/sepolicy/sepolicy/generate.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/python/sepolicy/sepolicy/generate.py b/python/sepolicy/sepolicy/generate.py
index 0edda54a..f88d6852 100644
--- a/python/sepolicy/sepolicy/generate.py
+++ b/python/sepolicy/sepolicy/generate.py
@@ -212,8 +212,6 @@ class policy:
             print("Can not get port types", e)
 
         self.symbols = {}
-        self.symbols["openlog"] = "set_use_kerberos(True)"
-        self.symbols["openlog"] = "set_use_kerb_rcache(True)"
         self.symbols["openlog"] = "set_use_syslog(True)"
         self.symbols["gethostby"] = "set_use_resolve(True)"
         self.symbols["getaddrinfo"] = "set_use_resolve(True)"
@@ -226,8 +224,7 @@ class policy:
         self.symbols["getpwnam"] = "set_use_uid(True)"
         self.symbols["getpwuid"] = "set_use_uid(True)"
         self.symbols["dbus_"] = "set_use_dbus(True)"
-        self.symbols["pam_"] = "set_use_pam(True)"
-        self.symbols["pam_"] = "set_use_audit(True)"
+        self.symbols["pam_"] = "set_use_pam(True);set_use_audit(True)"
         self.symbols["fork"] = "add_process('fork')"
         self.symbols["transition"] = "add_process('transition')"
         self.symbols["sigchld"] = "add_process('sigchld')"
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.