File: //usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/libreswan.cpython-38.pyc
U
i��d� � @ s. d dl mZmZmZmZ G dd� dee�ZdS )� )�Plugin�IndependentPlugin�SoSPredicate� PluginOptc @ s@ e Zd ZdZdZdZedddd�gZdZd Z d
d� Z
dd
� ZdS )� LibreswanzLibreswan IPsec� libreswan)ZnetworkZsecurityZ openshift�
ipsec-barfFzcollect ipsec barf output)�defaultZdesc)�/etc/ipsec.conf)r Zopenswanc C st | � dddg� | �ddddg� t| dd gd
did�}| jd
dg|d� | �d�r^| �d� | �ddddg� d S )Nr
z/etc/ipsec.dz/proc/net/xfrm_statzipsec verifyzipsec whack --statuszipsec whack --listallzcertutil -L -d sql:/etc/ipsec.dZ xfrm_userZ xfrm_algo�kmods�all)r Zrequiredzip xfrm policyz
ip xfrm state)Zpredr z
ipsec barfz/etc/ipsec.secretsz/etc/ipsec.secrets.dz/etc/ipsec.d/*.dbz/etc/ipsec.d/*.secrets)Z
add_copy_specZadd_cmd_outputr �
get_optionZadd_forbidden_path)�selfZ xfrm_pred� r �>/usr/lib/python3/dist-packages/sos/report/plugins/libreswan.py�setup s8 ��
���
�zLibreswan.setupc C s. d}| � d|d� | �d�r*| � d|d� d S )Nz/(aead|auth|auth-trunc|enc)(\s.*\s)(0x[0-9a-f]+)�statez\1\2********r Zbarf)Zdo_cmd_output_subr
)r Zxfrm_state_regexpr r r �postproc@ s �
�zLibreswan.postprocN)�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesr Zoption_list�filesZpackagesr r r r r r r s ��"r N)Zsos.report.pluginsr r r r r r r r r �<module> s