Blame SOURCES/sos-bz1087515-corosync-add-postprocessing-for-corosync-objctl.patch

e75bc7
From 77ea53cf7c13c59c2a1f4608d59e1b9e8f4da835 Mon Sep 17 00:00:00 2001
e75bc7
From: "Bryn M. Reeves" <bmr@redhat.com>
e75bc7
Date: Wed, 15 Oct 2014 15:57:47 +0100
e75bc7
Subject: [PATCH] [corosync] add postprocessing for corosync-objctl output
e75bc7
e75bc7
The corosync-objctl command may include fence device passwords in
e75bc7
its output. Remove them with the same postprocessing regex as the
e75bc7
cluster plugin uses.
e75bc7
e75bc7
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
e75bc7
---
e75bc7
 sos/plugins/corosync.py | 7 +++++++
e75bc7
 1 file changed, 7 insertions(+)
e75bc7
e75bc7
diff --git a/sos/plugins/corosync.py b/sos/plugins/corosync.py
e75bc7
index 2cd22c3..db9b547 100644
e75bc7
--- a/sos/plugins/corosync.py
e75bc7
+++ b/sos/plugins/corosync.py
e75bc7
@@ -40,6 +40,13 @@ class Corosync(Plugin):
e75bc7
         ])
e75bc7
         self.call_ext_prog("killall -USR2 corosync")
e75bc7
 
e75bc7
+    def postproc(self):
e75bc7
+        self.do_cmd_output_sub(
e75bc7
+            "corosync-objctl",
e75bc7
+            r"(.*fence.*\.passwd=)(.*)",
e75bc7
+            r"\1******"
e75bc7
+        )
e75bc7
+
e75bc7
 
e75bc7
 class RedHatCorosync(Corosync, RedHatPlugin):
e75bc7
 
e75bc7
-- 
e75bc7
1.9.3
e75bc7