3 ܓi @sbddlmZddlmZmZmZmZmZGdddeZGdddeeZGdddeeeZ d S) )glob)Plugin RedHatPlugin DebianPlugin UbuntuPlugin SoSPredicatec@s,eZdZdZdZd Zd ZddZd d Zd S)SssdzSystem security service daemonsssdservicessecurityidentity sssd-commoncCs|jdddg|jtddd|jddd gt|d gd }|jd |d |jd|d }|ddkrx4|djD]$}|jd||jd|qvWdS)Nz/etc/sssd/sssd.confz/etc/sssd/conf.d/*.confz%/var/lib/sss/pubconf/krb5.include.d/*z/var/log/sssd/*log*Z sssd_logs)Ztagsz/var/lib/sss/mc/passwdz/var/lib/sss/mc/groupz/var/lib/sss/mc/initgroupsr )r zsssctl config-check)Zpredzsssctl domain-listZstatusroutputzsssctl domain-status zsssctl access-report ) add_copy_specrrZadd_cmd_outputZcollect_cmd_output splitlines)selfZ sssd_predZdomainZ domain_namer/usr/lib/python3.6/sssd.pysetups  z Sssd.setupcCs$d}|jd|d|jd|ddS)Nz#((\s*ldap_default_authtok\s*=)(.*))z/etc/sssd/sssd.confz \2 ********z/etc/sssd/conf.d/*)Z do_file_subZdo_path_regex_sub)rZregexprrrpostproc9sz Sssd.postprocN)r r r )r r ) __name__ __module__ __qualname__Z short_descZ plugin_nameZprofilesZpackagesrrrrrrrs !rc@s eZdZdS) RedHatSssdN)rrrrrrrr@srcseZdZfddZZS) DebianSssdcstj|jddS)Nz/etc/default/sssd)superrr)r) __class__rrrFs zDebianSssd.setup)rrrr __classcell__rr)rrrDsrN) rZsos.report.pluginsrrrrrrrrrrrr s 0