3 Ü““i ã@sRddlmZmZmZmZGdd„deƒZGdd„deeƒZGdd„deeeƒZdS) é)ÚPluginÚ RedHatPluginÚ UbuntuPluginÚ DebianPluginc@s@eZdZdZdZdZdZdZdd„Zd d „Z d d „Z d d„Z dS)ÚAutofszAutofs on-demand automounterÚautofsÚstorageÚnfsú/etc/sysconfig/autofsú/etc/default/autofscCsB|jd|jžŽ}x,|D]$}x|jdƒD]}|dkr&dSq&WqWdS) z; testing if autofs debug has been enabled anywhere ú%^(DEFAULT_LOGGING|DAEMONOPTIONS)=(.*)ú ú--debugÚdebugTF)r )rr)Ú file_grepÚfilesÚsplit)ÚselfÚoptZopt1Zopt2©rú/usr/lib/python3.6/autofs.pyÚ checkdebugs   zAutofs.checkdebugcCs(|jd|jžŽ}x|D] }|dSWdS)z% capture daemon debug output ú^(daemon.*)\s+(\/var\/log\/.*)éN)r)rr)rZdebugoutÚirrrÚgetdaemondebug$s    zAutofs.getdaemondebugcCsF|jdƒ|jddiƒ|jdƒ|jdƒ|jƒrB|j|jƒƒdS)Nz /etc/auto*z/etc/autofs.confZ autofs_confrz automount -m)Z add_copy_specZ add_file_tagsZadd_service_statusÚadd_cmd_outputrr)rrrrÚsetup-s    z Autofs.setupcCs.|jdddƒ|jdddƒ|jdddƒdS)Nz /etc/auto*z(password=)[^,\s]*z \1********z/etc/autofs_ldap_auth.confz&(secret[\s]*[=]+[\s]*)(\'|\").*(\'|\")z\1\2********\3z automount -m)Zdo_path_regex_subZ do_file_subZdo_cmd_output_sub)rrrrÚpostproc5szAutofs.postprocN)rr )r r )r) Ú__name__Ú __module__Ú __qualname__Z short_descZ plugin_nameZprofilesrZpackagesrrrrrrrrrs  rcseZdZ‡fdd„Z‡ZS)Ú RedHatAutofscs"tƒjƒ|jdƒr|jdƒdS)NZverifyzrpm -qV autofs)ÚsuperrZ get_optionr)r)Ú __class__rrrWs  zRedHatAutofs.setup)rr r!rÚ __classcell__rr)r$rr"Usr"cseZdZ‡fdd„Z‡ZS)Ú DebianAutofscstƒjƒ|jdƒdS)Nzdpkg-query -s autofs)r#rr)r)r$rrr_s zDebianAutofs.setup)rr r!rr%rr)r$rr&]sr&N)Zsos.report.pluginsrrrrrr"r&rrrrÚ sG