Blame SOURCES/sos-bz1967115-sssd-memcache-and-logs.patch

47940b
From d03c2fa4439c87783293c922b2825cf86e8818bd Mon Sep 17 00:00:00 2001
47940b
From: =?UTF-8?q?Pawe=C5=82=20Po=C5=82awski?= <ppolawsk@redhat.com>
47940b
Date: Fri, 12 Mar 2021 12:42:30 +0100
47940b
Subject: [PATCH] [sssd] Enable collecting SSSD memory cache
47940b
MIME-Version: 1.0
47940b
Content-Type: text/plain; charset=UTF-8
47940b
Content-Transfer-Encoding: 8bit
47940b
47940b
SSSD plugin by default collects only logs and configuration.
47940b
This patch enables collecting memory cache maintained
47940b
by SSSD daemon. Cache does not contain any client sensible
47940b
data so can be safely included in the sos-report.
47940b
47940b
Resolves: #2444
47940b
47940b
Signed-off-by: Paweł Poławski <ppolawsk@redhat.com>
47940b
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
47940b
---
47940b
 sos/report/plugins/sssd.py | 8 ++++++--
47940b
 1 file changed, 6 insertions(+), 2 deletions(-)
47940b
47940b
diff --git a/sos/report/plugins/sssd.py b/sos/report/plugins/sssd.py
47940b
index 9469c41c..aeb68c4f 100644
47940b
--- a/sos/report/plugins/sssd.py
47940b
+++ b/sos/report/plugins/sssd.py
47940b
@@ -10,6 +10,7 @@
47940b
 
47940b
 from sos.report.plugins import (Plugin, RedHatPlugin, DebianPlugin,
47940b
                                 UbuntuPlugin, SoSPredicate)
47940b
+from glob import glob
47940b
 
47940b
 
47940b
 class Sssd(Plugin):
47940b
@@ -22,11 +23,22 @@ class Sssd(Plugin):
47940b
 
47940b
     def setup(self):
47940b
         self.add_copy_spec([
47940b
+            # main config file
47940b
             "/etc/sssd/sssd.conf",
47940b
-            "/var/log/sssd/*",
47940b
-            "/var/lib/sss/pubconf/krb5.include.d/*",
47940b
             # SSSD 1.14
47940b
-            "/etc/sssd/conf.d/*.conf"
47940b
+            "/etc/sssd/conf.d/*.conf",
47940b
+            # dynamic Kerberos configuration
47940b
+            "/var/lib/sss/pubconf/krb5.include.d/*"
47940b
+        ])
47940b
+
47940b
+        # add individual log files
47940b
+        self.add_copy_spec(glob("/var/log/sssd/*log*"))
47940b
+
47940b
+        # add memory cache
47940b
+        self.add_copy_spec([
47940b
+            "/var/lib/sss/mc/passwd",
47940b
+            "/var/lib/sss/mc/group",
47940b
+            "/var/lib/sss/mc/initgroups"
47940b
         ])
47940b
 
47940b
         # call sssctl commands only when sssd service is running,
47940b
-- 
47940b
2.26.3
47940b