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