o id8 @sRddlmZmZmZmZGdddeZGdddeeZGdddeeeZdS) )Plugin RedHatPlugin DebianPlugin UbuntuPlugincs4eZdZdZdZdZdZfddZddZZ S) LdapzLDAP configurationldap)identitysysmgmtsystemz/etc/openldap/ldap.confcstt||ddS)N/etc/ldap.conf)superrsetup add_copy_specself __class__9/usr/lib/python3/dist-packages/sos/report/plugins/ldap.pyr sz Ldap.setupcCs|ddddS)Nr (\s*bindpw\s*)\S+z\1******) do_file_subrrrrpostprocsz Ldap.postproc) __name__ __module__ __qualname__ short_desc plugin_nameprofiles ldap_confr r __classcell__rrrrr s rc0eZdZdZdZfddZfddZZS) RedHatLdap)openldapz nss-pam-ldapd)r /etc/pam_ldap.confcs@tt||gd||jddddg|ddS)N)z/etc/openldap/certs/passwordz/etc/openldap/certs/pwfile.txtz/etc/openldap/certs/pin.txtz/etc/openldap/certs/*passw*z/etc/openldap/certs/key3.dbz/etc/openldap/certs/cert8.dbz/etc/openldap/certs/secmod.db/etc/nslcd.confr#zcertutil -L -d /etc/openldap)r r!r add_forbidden_pathrradd_cmd_outputrrrrr !szRedHatLdap.setupcs*tt|dD] }||ddq dS)N)r$r#r \1********)r r!rr)rfrrrr4szRedHatLdap.postproc)rrrpackagesfilesr rrrrrrr!s  r!cr ) DebianLdapz/etc/ldap/ldap.conf)slapdz ldap-utilscsjtt|d}||jdddg|d|j|ddd|j|d d d|j|d d ddS) Nz,ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// z/etc/slapd.confz/etc/ldap/slapd.dr$z+ldapsearch -x -b '' -s base 'objectclass=*'z/-b cn=config '(!(objectClass=olcSchemaConfig))'configuration_minus_schemas)suggest_filenamez-b cn=schema,cn=config dnloaded_schemasz0-b cn=config '(olcAccess=*)' olcAccess olcSuffixaccess_control_lists)r r+r rrr&)r ldap_searchrrrr Cs*  zDebianLdap.setupcs.tt||ddd|ddddS)Nr$rr' ldapsearchz(olcRootPW\: \s*)\S+)r r+rrdo_cmd_output_subrrrrrZszDebianLdap.postproc)rrrrr)r rrrrrrr+>s  r+N)sos.report.pluginsrrrrrr!r+rrrrs"