o
    id	                     @   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)services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*	sssd_logs)tags)z/var/lib/sss/mc/passwdz/var/lib/sss/mc/groupz/var/lib/sss/mc/initgroupsr	   )r
   zsssctl config-check)predzsssctl domain-liststatusr   outputzsssctl domain-status -o )add_copy_specr   r   add_cmd_outputcollect_cmd_output
splitlines)self	sssd_preddomain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*=)(.*))r   z\2 ********z/etc/sssd/conf.d/*)do_file_subdo_path_regex_sub)r   regexpr   r   r   postproc8   s   zSssd.postprocN)	__name__
__module____qualname__
short_descplugin_nameprofiles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+   r2   r   r   r,   r-   r   r   r   G   s   zDebianSssd.setupr/   r   r   r-   r   r2   E   r1   r2   N)
sos.report.pluginsr   r   r   r   r   r   r   r*   r2   r   r   r   r   <module>   s
   
/