id8 dddlmZmZmZmZGddeZGddeeZGddeeeZy) )Plugin RedHatPlugin DebianPlugin UbuntuPluginc4eZdZdZdZdZdZfdZdZxZ S)LdapzLDAP configurationldap)identitysysmgmtsystemz/etc/openldap/ldap.confcLtt| |jdy)N/etc/ldap.conf)superrsetup add_copy_specself __class__s 9/usr/lib/python3/dist-packages/sos/report/plugins/ldap.pyrz Ldap.setups dD! +,c*|jdddy)Nr(\s*bindpw\s*)\S+z\1******) do_file_sub)rs rpostprocz Ldap.postprocs )+?Mr) __name__ __module__ __qualname__ short_desc plugin_nameprofiles ldap_confrr __classcell__rs@rrr s"%JK0H)I-Nrrc0eZdZdZdZfdZfdZxZS) RedHatLdap)openldapz nss-pam-ldapd)r/etc/pam_ldap.confctt| |jgd|j |j ddddg|j dy)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)rr%radd_forbidden_pathrr!add_cmd_outputrs rrzRedHatLdap.setup!s\ j$%' !    NN * +     :;rc^tt| dD]}|j|ddy)N)r)r'r \1********)rr%rr)rfrs rrzRedHatLdap.postproc4s6 j$(*: A   $  r)rrrpackagesfilesrrr"r#s@rr%r%s,H 4E<&rr%c0eZdZdZdZfdZfdZxZS) DebianLdapz/etc/ldap/ldap.conf)slapdz ldap-utilsctt| d}|j|jdddg|j d|j |dzd|j |d zd |j |d zd y) 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)rr2rrr!r+)r ldap_searchrs rrzDebianLdap.setupCs j$%'D   NN       IJ  K K:  <  5 5-  /  L L3  5rcvtt| |jddd|j dddy)Nr)rr- ldapsearchz(olcRootPW\: \s*)\S+)rr2rrdo_cmd_output_subrs rrzDebianLdap.postprocZs@ j$(*      #  r)rrrr!r/rrr"r#s@rr2r2>s%I&H5.   rr2N)sos.report.pluginsrrrrrr%r2rrr?s;PO N6 N |D' |\' r