| Current Path : /lib/python3/dist-packages/sos/report/plugins/__pycache__/ |
| Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/ldap.cpython-38.pyc |
U
���bz � @ sR d dl mZmZmZmZ G dd� de�ZG dd� dee�ZG dd� deee�ZdS ) � )�Plugin�RedHatPlugin�DebianPlugin�UbuntuPluginc s4 e Zd ZdZdZdZdZ� fdd�Zdd� Z� Z S ) �LdapzLDAP configurationZldap)ZidentityZsysmgmt�systemz/etc/openldap/ldap.confc s t t| ��� | �d� d S )N�/etc/ldap.conf)�superr �setup�
add_copy_spec��self�� __class__� �9/usr/lib/python3/dist-packages/sos/report/plugins/ldap.pyr
s z
Ldap.setupc C s | � ddd� d S )Nr �(\s*bindpw\s*)\S+z\1******)�do_file_subr r r r �postproc s z
Ldap.postproc)
�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofiles� ldap_confr
r �
__classcell__r r r r r s r c s0 e Zd ZdZdZ� fdd�Z� fdd�Z� ZS )�
RedHatLdap)Zopenldapz
nss-pam-ldapd)r �/etc/pam_ldap.confc sF t t| ��� | �dddddg� | �| jdddd g� | �d
� d S )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.db�/etc/nslcd.confr zcertutil -L -d /etc/openldap)r r r
Zadd_forbidden_pathr r �add_cmd_outputr r r r r
! s ��zRedHatLdap.setupc s. t t| ��� | �ddd� | �ddd� d S )Nr r �
\1********r )r r r r r r r r r 4 s ��zRedHatLdap.postproc)r r r �packages�filesr
r r r r r r r s r c s0 e Zd ZdZdZ� fdd�Z� fdd�Z� ZS )�
DebianLdapz/etc/ldap/ldap.conf)Zslapdz
ldap-utilsc sj t t| ��� d}| �| jdddg� | �d� | j|d dd� | j|d d
d� | j|d dd� d S )
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))'Zconfiguration_minus_schemas)Zsuggest_filenamez-b cn=schema,cn=config dnZloaded_schemasz0-b cn=config '(olcAccess=*)' olcAccess olcSuffixZaccess_control_lists)r r! r
r r r )r
Zldap_searchr r r r
G s* �
���zDebianLdap.setupc s. t t| ��� | �ddd� | �ddd� d S )Nr r r Z
ldapsearchz(olcRootPW\: \s*)\S+)r r! r r Zdo_cmd_output_subr r r r r ^ s ��zDebianLdap.postproc)r r r r r r
r r r r r r r! B s r! N)Zsos.report.pluginsr r r r r r r! r r r r �<module> s &