Current File : //usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/ldap.cpython-312.pyc
�

-�_g���d�ddlmZmZmZmZGd�de�ZGd�dee�ZGd�deee�Zy)	�)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPluginc�4��eZdZdZdZdZdZ�fd�Zd�Z�xZ	S)�LdapzLDAP configuration�ldap)�identity�sysmgmt�systemz/etc/openldap/ldap.confc�D��t�|��|jd�y)N�/etc/ldap.conf)�super�setup�
add_copy_spec��self�	__class__s ��9/usr/lib/python3/dist-packages/sos/report/plugins/ldap.pyrz
Ldap.setups���
��
�����+�,�c�*�|jddd�y)Nr�(\s*bindpw\s*)\S+z\1******)�do_file_sub)rs r�postprocz
Ldap.postprocs�����)�+?��Mr)
�__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�	ldap_confrr�
__classcell__�rs@rrrs"���%�J��K�0�H�)�I�-�Nrrc�0��eZdZdZdZ�fd�Z�fd�Z�xZS)�
RedHatLdap)�openldapz
nss-pam-ldapd)r�/etc/pam_ldap.confc���t�|��|jgd��|j|jddddg�|jd�y)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�add_forbidden_pathrr!�add_cmd_outputrs �rrzRedHatLdap.setup!sX���
��
�����!
�	�	
����N�N�*�+�� �
�	�	
���:�;rc�V��t�|��dD]}|j|dd��y)N)r)r'r�
\1********)rrr)r�filers  �rrzRedHatLdap.postproc4s4���
����=�	�D�����$��
�	r)rrr�packages�filesrrr"r#s@rr%r%s���,�H�4�E�<�&�rr%c�0��eZdZdZdZ�fd�Z�fd�Z�xZS)�
DebianLdapz/etc/ldap/ldap.conf)�slapdz
ldap-utilsc�
��t�|��d}|j|jdddg�|j	d�|j	|dzd��|j	|d	zd
��|j	|dzd��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 dn�loaded_schemasz0-b cn=config '(olcAccess=*)' olcAccess olcSuffix�access_control_lists)rrrr!r+)r�ldap_searchrs  �rrzDebianLdap.setupCs����
��
��D������N�N����	
�	�	
���I�J�����K�K�:�	�	<�	
����5�5�-�	�	/�	
����L�L�3�	�	5rc�n��t�|��|jddd�|jddd�y)Nr)rr-�
ldapsearchz(olcRootPW\: \s*)\S+)rrr�do_cmd_output_subrs �rrzDebianLdap.postprocZs>���
�������� ��	
�
	
����#��	
r)rrrr!r/rrr"r#s@rr2r2>s���%�I�&�H�5�.
�
rr2N)�sos.report.pluginsrrrrrr%r2�rr�<module>r?s;��P�O�
N�6�
N� ��|��D'
��|�\�'
r