HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/ldap.cpython-310.pyc
o

���bz�@sRddlmZmZmZmZGdd�de�ZGdd�dee�ZGdd�deee�ZdS)	�)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPlugincs4eZdZdZdZdZdZ�fdd�Zdd�Z�Z	S)	�LdapzLDAP configuration�ldap)�identity�sysmgmt�systemz/etc/openldap/ldap.confcstt|���|�d�dS)N�/etc/ldap.conf)�superr�setup�
add_copy_spec��self��	__class__��9/usr/lib/python3/dist-packages/sos/report/plugins/ldap.pyr
sz
Ldap.setupcCs|�ddd�dS)Nr�(\s*bindpw\s*)\S+z\1******)�do_file_subrrrr�postprocsz
Ldap.postproc)
�__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�	ldap_confr
r�
__classcell__rrrrrsrc�0eZdZdZdZ�fdd�Z�fdd�Z�ZS)�
RedHatLdap)�openldapz
nss-pam-ldapd)r�/etc/pam_ldap.confcs@tt|���|�gd��|�|jddddg�|�d�dS)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_pathrr�add_cmd_outputrrrrr
!s�zRedHatLdap.setupcs.tt|���|�ddd�|�ddd�dS)Nr$r�
\1********r#)rr!rrrrrrr4���zRedHatLdap.postproc)rrr�packages�filesr
rrrrrrr!s
r!cr )�
DebianLdapz/etc/ldap/ldap.conf)�slapdz
ldap-utilscsjtt|���d}|�|jdddg�|�d�|j|ddd�|j|d	d
d�|j|ddd�dS)
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)rr+r
rrr&)r�ldap_searchrrrr
Gs*�
��
�zDebianLdap.setupcs.tt|���|�ddd�|�ddd�dS)Nr$rr'�
ldapsearchz(olcRootPW\: \s*)\S+)rr+rr�do_cmd_output_subrrrrr^r(zDebianLdap.postproc)rrrrr)r
rrrrrrr+Bs
r+N)�sos.report.pluginsrrrrrr!r+rrrr�<module>s&