id 0ddlmZmZmZGddeeZy))PluginIndependentPlugin PluginOptcDeZdZdZdZdZeddedgZdZ d Z d Z y ) SshzSecure shell servicessh)servicessecuritysystemidentity userconfsTz5Changes whether module will collect user .ssh configs)defaultval_typedescc|jdddddg}|j||j||jdr|j yy)N sshd_config ssh_config)z/etc/ssh/sshd_config$z/etc/ssh/ssh_config$z/etc/ssh/ssh_configz/etc/ssh/sshd_configr ) add_file_tags add_copy_specincluded_configs get_optionuser_ssh_files_permissions)selfsshcfgss 8/usr/lib/python3/dist-packages/sos/report/plugins/ssh.pysetupz Ssh.setupsg %2$0  " " 7# g& ??; '  + + - (c |D]}|jdd}t|j|d5}|D]v}t|jdk(s|j dr1|j j dsQ|j}|j |d|x dddy#1swYxYw#t$rYywxYw) N/rr#include)tags)splitopen path_joinlen startswithlowerr Exception)rrsshcfgtagcfgfilelineconfargs rrzSsh.included_configs0s ! Ell3'+$..0#6E' 'Etzz|,1T__S5I$::<229=&*jjlG ..wqz.DEEE EEE   s/4C AB> (B>3 C >C C CCc|jd}|dr5 t|jd5}|j}dddn|dj }D]X} |j|jddd }|j|r |jd j|Zy#1swY{xYw#t$r|j dYywxYw#t$rYwxYw) z Iterate over .ssh folders in user homes to see their permissions. Bad permissions can prevent SSH from allowing access to given user. z getent passwdstatusz /etc/passwdNzCouldn't read /etc/passwdoutput:z.sshz ls -laZ {}) exec_cmdr'r( readlinesr, _log_error splitlinesr& path_isdiradd_cmd_outputformat IndexError)r users_data passwd_fileusers_data_linesusr_linehome_dirs rrzSsh.user_ssh_files_permissionsAs ]]?3 h  $..78?K'2'<'<'>$? *(3>>@ ) H >>(..*=a*@&I??8,'' (;(;H(EF  ??  ;<   s;C B=C %AC)=CC C&%C&) C54C5N) __name__ __module__ __qualname__ short_desc plugin_nameprofilesrstr option_listrrrrrrrs<'JK=H +tc4 6K .*"rrN)sos.report.pluginsrrrrrLrrrNsDCN&#Nr