← Back
Editing: bind_ports.cpython-312.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 )�pluginzO SELinux is preventing $SOURCE_PATH from binding to port $PORT_NUMBER. a� SELinux has denied the $SOURCE from binding to a network port $PORT_NUMBER which does not have an SELinux type associated with it. If $SOURCE should be allowed to listen on $PORT_NUMBER, use the <i>semanage</i> command to assign $PORT_NUMBER to a port type that $SOURCE_TYPE can bind to (%s). If $SOURCE is not supposed to bind to $PORT_NUMBER, this could signal an intrusion attempt. aI If you want to allow $SOURCE to bind to port $PORT_NUMBER, you can execute # semanage port -a -t PORT_TYPE -p %s $PORT_NUMBER where PORT_TYPE is one of the following: %s. If this system is running as an NIS Client, turning on the allow_ypbind boolean may fix the problem. setsebool -P allow_ypbind=1. � zFIf you want to allow $SOURCE_PATH to bind 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 �//usr/share/setroubleshoot/plugins/bind_ports.py�get_do_textzplugin.get_do_text2 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__: 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_bindr r z, )�matches_target_types�has_any_access_in�allowed_target_types�report�tclassr �join)r r � allowed_typess r �analyzezplugin.analyze>