HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/sos/report/plugins/__pycache__/libreswan.cpython-310.pyc
o

i��d�	�@s.ddlmZmZmZmZGdd�dee�ZdS)�)�Plugin�IndependentPlugin�SoSPredicate�	PluginOptc@s@eZdZdZdZdZedddd�gZdZd	Z	d
d�Z
dd
�ZdS)�	LibreswanzLibreswan IPsec�	libreswan)�network�security�	openshift�
ipsec-barfFzcollect ipsec barf output)�default�desc)�/etc/ipsec.conf)r�openswancCsj|�gd��|�gd��t|ddgddid�}|jdd	g|d
�|�d�r,|�d�|�gd
��dS)N)rz/etc/ipsec.dz/proc/net/xfrm_stat)zipsec verifyzipsec whack --statuszipsec whack --listallzcertutil -L -d sql:/etc/ipsec.d�	xfrm_user�	xfrm_algo�kmods�all)r�requiredzip xfrm policyz
ip xfrm state)�predrz
ipsec barf)z/etc/ipsec.secretsz/etc/ipsec.secrets.dz/etc/ipsec.d/*.dbz/etc/ipsec.d/*.secrets)�
add_copy_spec�add_cmd_outputr�
get_option�add_forbidden_path)�self�	xfrm_pred�r�>/usr/lib/python3/dist-packages/sos/report/plugins/libreswan.py�setups
���

zLibreswan.setupcCs2d}|�d|d�|�d�r|�d|d�dSdS)Nz/(aead|auth|auth-trunc|enc)(\s.*\s)(0x[0-9a-f]+)�statez\1\2********r�barf)�do_cmd_output_subr)r�xfrm_state_regexprrr�postproc@s�
��zLibreswan.postprocN)�__name__�
__module__�__qualname__�
short_desc�plugin_name�profilesr�option_list�files�packagesrr#rrrrrs��"rN)�sos.report.pluginsrrrrrrrrr�<module>s