aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Jansky <jjansky@redhat.com>2020-01-16 14:41:46 +0100
committerJake Hunsaker <jhunsake@redhat.com>2020-01-27 12:57:03 -0500
commite9c9ad1e626eae2952dc6a619620d34234d78bdc (patch)
tree6404953608e183ff72cd8c6c2873b546e7846d50
parent428918b5550e9efb9f12967f494c19b5daa672b8 (diff)
downloadsos-e9c9ad1e626eae2952dc6a619620d34234d78bdc.tar.gz
[ipa] Collect 'getcert list' only if service certmonger is running
During collection of 'getcert list' is started certmonger service. That is not wanted behavior, as result should be 'getcert list' collected only if certmonger is running. Resolves: #1920 Signed-off-by: Jan Jansky <jjansky@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/plugins/ipa.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/sos/plugins/ipa.py b/sos/plugins/ipa.py
index d3454de9..273d8509 100644
--- a/sos/plugins/ipa.py
+++ b/sos/plugins/ipa.py
@@ -8,7 +8,7 @@
#
# See the LICENSE file in the source distribution for further information.
-from sos.plugins import Plugin, RedHatPlugin
+from sos.plugins import Plugin, RedHatPlugin, SoSPredicate
from glob import glob
from os.path import exists
@@ -152,7 +152,6 @@ class Ipa(Plugin, RedHatPlugin):
self.add_cmd_output([
"ls -la /etc/dirsrv/slapd-*/schema/",
- "getcert list",
"certutil -L -d /etc/httpd/alias/",
"pki-server cert-find --show-all",
"pki-server subsystem-cert-validate ca",
@@ -161,6 +160,11 @@ class Ipa(Plugin, RedHatPlugin):
"klist -ket /var/lib/ipa/gssproxy/http.keytab"
])
+ getcert_pred = SoSPredicate(self,
+ services=['certmonger'])
+
+ self.add_cmd_output("getcert list", pred=getcert_pred)
+
for certdb_directory in glob("/etc/dirsrv/slapd-*/"):
self.add_cmd_output("certutil -L -d %s" % certdb_directory)
return