HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/python3.9/site-packages/sos/report/plugins/__pycache__/sos_extras.cpython-39.pyc
a

\��h��@s6ddlZddlZddlmZmZGdd�dee�ZdS)�N)�Plugin�IndependentPluginc@s&eZdZdZdZdZefZdd�ZdS)�	SosExtrasz/Collect extra data defined in /etc/sos/extras.dZ
sos_extrasz/etc/sos/extras.d/cCs�zLt�|j�}|jdks0|jtj@s0|jtj@rJ|�d|j�d��WdSWn(tyt|�d|j�d��YdS0t�	|j�D�]H\}}}|D�]6}|�
||�}|�d|���z�t|ddd	���}|���
�D]�}t|���dks�|�d
�r�q�|�d��rr|��}	d}
t|	�dk�rVzt|	d�}
Wn,t�yT|�d
|�d|�d��Yn0|j|	ddd�|
d�q�|j||d�q�Wd�n1�s�0YWq�t�y�|�d|���Yq�0q�q�dS)NrzSkipping sos extras as z' has too wide permissions or ownership.zcan't stat z, skipping sos extrasz!Collecting data from extras file �rzUTF-8)�encoding�#�:�zCan't decode size limit on linez in z, using default)Z	sizelimit)Zsubdirzunable to read extras file )�os�stat�
extras_dir�st_uid�st_mode�S_IWGRP�S_IWOTHZ	_log_warn�OSError�walkZ	path_join�open�read�
splitlines�len�split�
startswith�int�
ValueErrorZ
add_copy_specZadd_cmd_output�IOError)�selfZst_res�path�_Zfilelist�fileZ_fileZsfile�line�words�limit�r#�A/usr/lib/python3.9/site-packages/sos/report/plugins/sos_extras.py�setup.sN
�

���
�4zSosExtras.setupN)�__name__�
__module__�__qualname__Z
short_descZplugin_namer�filesr%r#r#r#r$rs
r)r
rZsos.report.pluginsrrrr#r#r#r$�<module>	s