aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2013-08-13 15:19:02 +0100
committerBryn M. Reeves <bmr@redhat.com>2013-08-13 15:19:02 +0100
commit4e0359b437421df175614cd14fb3b36addfda1ac (patch)
treec27c44a77e47c9b33f0a7ac1b403639150435122
parentc1b7d7ffdd685f0894f3370a17bf631d6facbab1 (diff)
downloadsos-4e0359b437421df175614cd14fb3b36addfda1ac.tar.gz
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 <bmr@redhat.com>
-rw-r--r--sos/plugins/ldap.py13
1 files 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********")