+
    i  c                   sF    ^ RI t ^ RIHt ^ RIHtHtHt  ! R R]]4      tR# )i    N)glob)PluginIndependentPlugin	PluginOptc                   sV   a  ] tR t^t o RtRtRt]! RRRR7      .tR t	R t
R	 tR
tV tR# )SshzSecure shell serviceZssh	userconfsFz5Changes whether module will collect user .ssh configs)ZdefaultZdescc                s    V P                  R RRR/4       . ROpV P                  V4       V P                  V4       V P                  R4      '       d   V P	                  4        V P                  R4       R# )z/etc/ssh/sshd_config$Zsshd_configz/etc/ssh/ssh_config$Z
ssh_configr   zsshd -TN)z/etc/ssh/ssh_configz/etc/ssh/sshd_configz/etc/ssh/sshd_config.d/*)Zadd_file_tagsadd_copy_specincluded_configsZ
get_optionuser_ssh_files_permissionsZadd_cmd_output)selfsshcfgss   & ;/usr/lib/python3.14/site-packages/sos/report/plugins/ssh.pysetupZ	Ssh.setup   sq    #]"L
 	
 	7#g& ??;''++- 	I&    c           	     s    V Uu. uF  p\        VRR7      NK  	  up UUu. uF  pV F  pVNK  	  K  	  pppV F  pVP                  R4      R,          p\        V P                  V4      RRR7      ;_uu_ 4       pV F  p	\	        V	P                  4       4      ^ 8X  g   V	P                  R4      '       d   K:  V	P                  4       P                  R4      '       g   Ka  V	P                  4       p
V P                  V
^,          VR	7       K  	  R
R
R
4       K  	  R
# u upi u uppi   + '       g   i     K  ; i  \         d     R
# i ; i)zInclude subconfig files T)Z	recursiveZ/rUTF-8ZencodingZ#Zinclude)ZtagsNi)	r    splitopen	path_joinZlenZ
startswithZlowerr   	Exception)r	   r
   ZcopyspecZfilesZfZcfgfilesZsshcfgZtagZcfgfilelineZconfargs   &&         r   r   ZSsh.included_configs6   s4   	 DK CJxDT27  e a       
 #ll3'+$..0##*, ,/6 'tzz|,1T__S5I5I$::<229==&*jjlG ..wqz.D !(, , #	 , , ,  		sP   D: DD: D AD: ;:D&6$D&.D&D: D: &D71	D: :E	E	c                s2   \         P                  ! 4       p/ p \        RRRR7      ;_uu_ 4       pV F   pVP                  4       R,          w  rVWbV&   K"  	  RRR4       0 RmpT Fy  pTP                  T9   d9   Y(P                  ,          T9   d"   T P                  RTP                   R	24       KL  T P                  TP                  R
4      p	T P                  T	4       K{  	  R#   + '       g   i     L; i  \         d    T P                  R4        R# i ; i)z
Iterate over .ssh folders in user homes to see their permissions.

Bad permissions can prevent SSH from allowing access to given user.
z/proc/mountsr   r   r   :i   i   NNzCouldn't read /proc/mountszSkipping capture in z  because it's a remote directoryz.ssh>   ZnfsZnfs4Zautofs)
pwdZgetpwallr   r   r   Z
_log_errorZpw_dirZ	_log_infor   Zadd_dir_listing)
r	   Z
users_dataZfs_mount_infoZmounts_filer   Zfs_fileZ	fs_vstypeZnon_local_fsZuserZhome_dirs
   &         r   r   ZSsh.user_ssh_files_permissionsN   s     \\^
	ncG<<'D+/::<+<(W-6'* ( = 1D{{m+!++.,>.t{{m:; ~~dkk6:H  *  =<  	OO89	s.   C6 'C#C6 #C3	.C6 3C6 6DD N)ZservicesZsecurityZsystemZidentity)Z__name__Z
__module__Z__qualname__Z__firstlineno__Z
short_descZplugin_nameZprofilesr   Zoption_listr   r   r   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      sB     'JK=H 	+u4	6K'20+ +r   r   )r   r    Zsos.report.pluginsr   r   r   r   r   r   r   <module>r      s$      C CZ+&# Z+r   