From 4e0359b437421df175614cd14fb3b36addfda1ac Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Tue, 13 Aug 2013 15:19:02 +0100 Subject: Add pam_ldap.conf collection to ldap plug-in Add the pam_ldap.conf file to the data collected by the ldap plug-in and tidy up substitution strings for this plug-in. Signed-off-by: Bryn M. Reeves --- sos/plugins/ldap.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sos/plugins/ldap.py b/sos/plugins/ldap.py index 4d330767..361de73f 100644 --- a/sos/plugins/ldap.py +++ b/sos/plugins/ldap.py @@ -39,23 +39,28 @@ class Ldap(Plugin): self.add_copy_spec("/etc/ldap.conf") def postproc(self): - self.do_file_sub("/etc/ldap.conf", r"(\s*bindpw\s*)\S+", r"\1***") + self.do_file_sub("/etc/ldap.conf", r"(\s*bindpw\s*)\S+", r"\1******") class RedHatLdap(Ldap, RedHatPlugin): """LDAP related information for RedHat based distribution """ packages = ('openldap', 'nss-pam-ldapd') + files = ('/etc/ldap.conf', '/etc/pam_ldap.conf') def setup(self): super(RedHatLdap, self).setup() self.add_copy_specs([ "/etc/openldap", - "/etc/nslcd.conf" + "/etc/nslcd.conf", + "/etc/pam_ldap.conf" ]) def postproc(self): - self.do_file_sub("/etc/nslcd.conf", r"(\s*bindpw\s*)\S+", r"\1***") + self.do_file_sub("/etc/nslcd.conf", + r"(\s*bindpw\s*)\S+", r"\1********") + self.do_file_sub("/etc/pam_ldap.conf", + r"(\s*bindpw\s*)\S+", r"\1********") class DebianLdap(Ldap, DebianPlugin, UbuntuPlugin): """LDAP related information for Debian based distribution @@ -86,4 +91,4 @@ class DebianLdap(Ldap, DebianPlugin, UbuntuPlugin): def postproc(self): self.do_cmd_output_sub( "ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=config '(!(objectClass=olcSchemaConfig))'", - r"(olcRootPW\: \s*)\S+", r"\1***") + r"(olcRootPW\: \s*)\S+", r"\1********") -- cgit