HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/sos/report/plugins/__pycache__/sos_extras.cpython-38.pyc
U

i��d��@s6ddlmZmZddlZddlZGdd�dee�ZdS)�)�Plugin�IndependentPluginNc@s&eZdZdZdZdZefZdd�ZdS)�	SosExtrasz/Collect extra data defined in /etc/sos/extras.dZ
sos_extrasz/etc/sos/extras.d/c
Cs�zHt�|j�}|jdks0|jtj@s0|jtj@rF|�d|j�WdSWn&tk
rn|�d|j�YdSXt�	|j�D�]\}}}|D�]}|�
||�}|�d|�z�t|����
�D]�}t|���dks�|�d�r�q�|�d��rZ|��}d}	t|�dk�r>zt|d�}	Wn(tk
�r<|�d||f�YnX|j|ddd�|	d	�q�|j||d
�q�Wq�tk
�r�|�d|�Yq�Xq�q|dS)Nrz@Skipping sos extras as %s has too wide permissions or ownership.z"can't stat %s, skipping sos extrasz#Collecting data from extras file %s�#�:�zFCan't decode integer sizelimit on line '%s' in file %s, using default.)Z	sizelimit)Zsubdirzunable to read extras file %s)�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)
�self�st�path�dirlistZfilelist�fZ_file�lineZwords�limit�r!�?/usr/lib/python3/dist-packages/sos/report/plugins/sos_extras.py�setup.sH
��
�
�zSosExtras.setupN)�__name__�
__module__�__qualname__Z
short_descZplugin_namer
�filesr#r!r!r!r"rs
r)Zsos.report.pluginsrrrr	rr!r!r!r"�<module>	s