← Back
Editing: connect_ports.cpython-312.opt-1.pyc
� �Z`� � �x � d dl Z e j dd�� Zej Zd dl� d dlmZ G d� de� Zy) � Nzsetroubleshoot-pluginsT)�fallback)�*)�Pluginc �f � e Zd Z ed� Z ed� Z ed� ZdZ ed� ZdZ d� Z d� Zd � Zy )�pluginzR SELinux is preventing $SOURCE_PATH from connecting to port $PORT_NUMBER. a� SELinux has denied $SOURCE from connecting to a network port $PORT_NUMBER which does not have an SELinux type associated with it. If $SOURCE should be allowed to connect on $PORT_NUMBER, use the <i>semanage</i> command to assign $PORT_NUMBER to a port type that $SOURCE_TYPE can connect to (%s). If $SOURCE is not supposed to connect to $PORT_NUMBER, this could signal an intrusion attempt. z� If you want to allow $SOURCE to connect to $PORT_NUMBER, you can execute # semanage port -a -t PORT_TYPE -p %s $PORT_NUMBER where PORT_TYPE is one of the following: %s. � zIIf you want to allow $SOURCE_PATH to connect to network port $PORT_NUMBERz!you need to modify the port type.c � � |d j d� }t |� dkD rt d� |z S t d� |d |d fz S )N� �,zc# semanage port -a -t PORT_TYPE -p %s $PORT_NUMBER where PORT_TYPE is one of the following: %s.z+# semanage port -a -t %s -p %s $PORT_NUMBERr )�split�len�_)�self�avc�options�portss �2/usr/share/setroubleshoot/plugins/connect_ports.py�get_do_textzplugin.get_do_text0 s^ � ��� � � ��%���u�:��>�� 4� 5�7>�?� ?� �B�C�w�q�z�SZ�[\�S]�F^�^�^� c �Z � t j | t � | j d� y )N�d )r �__init__�__name__�set_priority)r s r r zplugin.__init__8 s � �����h�'����#�r c �� � |j g d�� rb|j dg� rP|j � }|r>| j |j j d� d dj |� f� S y )N)�hi_reserved_port_t�reserved_port_t�port_t�unreserved_port_t�name_connectr r z, )�matches_target_types�has_any_access_in�allowed_target_types�report�tclassr �join)r r � allowed_typess r �analyzezplugin.analyze<