Sindbad~EG File Manager

Current Path : /lib/python3.6/site-packages/sos/report/plugins/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/sos/report/plugins/__pycache__/ldap.cpython-36.opt-1.pyc

3

�f��@sRddlmZmZmZmZGdd�de�ZGdd�dee�ZGdd�deee�ZdS)	�)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPlugincs4eZdZdZdZdZdZ�fdd�Zd	d
�Z�Z	S)�LdapzLDAP configurationZldap�identity�sysmgmt�systemz/etc/openldap/ldap.confcst�j�|jd�dS)Nz/etc/ldap.conf)�super�setup�
add_copy_spec)�self)�	__class__��/usr/lib/python3.6/ldap.pyrs
z
Ldap.setupcCs|jddd�dS)Nz/etc/ldap.confz(\s*bindpw\s*)\S+z\1******)�do_file_sub)r
rrr�postprocsz
Ldap.postproc)rrr	)
�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofiles�	ldap_confrr�
__classcell__rr)rrrsrcs0eZdZd	Zd
Z�fdd�Z�fdd�Z�ZS)�
RedHatLdap�openldap�
nss-pam-ldapd�/etc/ldap.conf�/etc/pam_ldap.confcsBt�j�|jdddddg�|j|jdddd	g�|jd
�dS)Nz/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.dbz/etc/nslcd.confz/etc/pam_ldap.confzcertutil -L -d /etc/openldap)r
rZadd_forbidden_pathrr�add_cmd_output)r
)rrrr!s
zRedHatLdap.setupcs*t�j�xdD]}|j|dd�qWdS)N�/etc/nslcd.conf�/etc/pam_ldap.confz(\s*bindpw\s*)\S+z
\1********)rr)r
rr)r
�file)rrrr4s

zRedHatLdap.postproc)rr)rr)rrr�packages�filesrrrrr)rrrsrcs0eZdZdZdZ�fdd�Z�fdd�Z�ZS)	�
DebianLdapz/etc/ldap/ldap.conf�slapd�
ldap-utilscsft�j�d}|j|jdddg�|jd�|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.dz/etc/nslcd.confz+ldapsearch -x -b '' -s base 'objectclass=*'z/-b cn=config '(!(objectClass=olcSchemaConfig))'Zconfiguration_minus_schemas)Zsuggest_filenamez-b cn=schema,cn=config dnZloaded_schemasz0-b cn=config '(olcAccess=*)' olcAccess olcSuffixZaccess_control_lists)r
rrrr)r
Zldap_search)rrrrCs"

zDebianLdap.setupcs*t�j�|jddd�|jddd�dS)Nz/etc/nslcd.confz(\s*bindpw\s*)\S+z
\1********Z
ldapsearchz(olcRootPW\: \s*)\S+)r
rrZdo_cmd_output_sub)r
)rrrrZs
zDebianLdap.postproc)r$r%)rrrrr!rrrrr)rrr#>sr#N)Zsos.report.pluginsrrrrrrr#rrrr�<module>	s"

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists