o
    *b	                     @   sb   d dl mZmZmZmZmZ d dlmZ G dd deZG dd deeZG dd deeeZ	d	S )
    )PluginRedHatPluginDebianPluginUbuntuPluginSoSPredicate)globc                   @   s,   e Zd ZdZdZdZdZdd Zdd Zd	S )
SssdzSystem security service daemonsssd)servicesZsecurityidentity)r	   zsssd-commonc                 C   s   |  g d | j tddd |  g d t| dgd}| jd|d	 | jd
|d	}|d dkrB|d  D ]}| d|  q8d S d S )N)/etc/sssd/sssd.confz/etc/sssd/conf.d/*.confz%/var/lib/sss/pubconf/krb5.include.d/*z/var/log/sssd/*log*Z	sssd_logs)Ztags)z/var/lib/sss/mc/passwdz/var/lib/sss/mc/groupz/var/lib/sss/mc/initgroupsr	   )r
   zsssctl config-check)Zpredzsssctl domain-liststatusr   outputzsssctl domain-status -o )add_copy_specr   r   Zadd_cmd_outputZcollect_cmd_output
splitlines)selfZ	sssd_preddomainZdomain_name r   9/usr/lib/python3/dist-packages/sos/report/plugins/sssd.pysetup   s   
z
Sssd.setupc                 C   s$   d}|  d|d | d|d d S )Nz#(\s*ldap_default_authtok\s*=\s*)\S+r   z
\1********z/etc/sssd/conf.d/*)Zdo_file_subZdo_path_regex_sub)r   Zregexpr   r   r   postproc8   s   zSssd.postprocN)	__name__
__module____qualname__Z
short_descZplugin_nameZprofilesZpackagesr   r   r   r   r   r   r      s     r   c                          e Zd Z fddZ  ZS )
RedHatSssdc                    s   t t|   d S )N)superr   r   r   	__class__r   r   r   A   s   zRedHatSssd.setupr   r   r   r   __classcell__r   r   r   r   r   ?       r   c                       r   )
DebianSssdc                    s   t t|   | d d S )Nz/etc/default/sssd)r   r#   r   r   r   r   r   r   r   G   s   zDebianSssd.setupr    r   r   r   r   r#   E   r"   r#   N)
Zsos.report.pluginsr   r   r   r   r   r   r   r   r#   r   r   r   r   <module>   s
   
/