관리-도구
편집 파일: libreswan.cpython-39.pyc
a -�_g� � @ 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)�networkZsecurityZ openshift� ipsec-barfFzcollect ipsec barf output)�defaultZdesc)�/etc/ipsec.conf)r Zopenswanc C sj | � g d�� | �g d�� t| ddgddid�}| jdd g|d � | �d�rX| �d� | �g d �� d S )N)r z/etc/ipsec.dz/proc/net/xfrm_stat)zipsec verifyzipsec whack --statuszipsec whack --listallzcertutil -L -d sql:/etc/ipsec.dZ xfrm_userZ xfrm_algo�kmods�all)r �requiredzip xfrm policyz ip xfrm state)Zpredr z ipsec barf)z/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.9/site-packages/sos/report/plugins/libreswan.py�setup s ��� 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