commit 4f7c109161406df96c37f9b204988649c9ed78a5 Author: Bryn M. Reeves Date: Tue Aug 13 14:51:34 2013 +0100 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 enabled checks for this plug-in. Signed-off-by: Bryn M. Reeves diff --git a/sos/plugins/ldap.py b/sos/plugins/ldap.py index eb8a8c9..4a41a83 100644 --- a/sos/plugins/ldap.py +++ b/sos/plugins/ldap.py @@ -18,10 +18,9 @@ import os class ldap(sos.plugintools.PluginBase): """LDAP related information """ - def checkenabled(self): - self.packages = [ "openldap", "nss-pam-ldapd" ] - self.files = [ "/etc/openldap/ldap.conf" ] - return sos.plugintools.PluginBase.checkenabled(self) + + packages = [ "openldap", "nss-pam-ldapd" ] + files = [ "/etc/openldap/ldap.conf", "/etc/pam_ldap.conf" ] def get_ldap_opts(self): # capture /etc/openldap/ldap.conf options in dict @@ -45,8 +44,10 @@ class ldap(sos.plugintools.PluginBase): self.addCopySpec("/etc/ldap.conf") self.addCopySpec("/etc/nslcd.conf") self.addCopySpec("/etc/openldap") + self.addCopySpec("/etc/pam_ldap.conf") def postproc(self): - self.doRegexSub("/etc/ldap.conf", r"(\s*bindpw\s*)\S+", r"\1***") - self.doRegexSub("/etc/nslcd.conf", r"(\s*bindpw\s*)\S+", r"\1***") + self.doRegexSub("/etc/ldap.conf", r"(\s*bindpw\s*)\S+", r"\1********") + self.doRegexSub("/etc/nslcd.conf", r"(\s*bindpw\s*)\S+", r"\1********") + self.doRegexSub("/etc/pam_ldap.conf", r"(\s*bindpw\s*)\S+", r"\1********") return