dbfdg
3
nma@ @ sD d dl Z e jdddZej Zd dlT d dlmZ G dd deZdS ) Nzsetroubleshoot-pluginsT)Zfallback)*)Pluginc @ sL e Zd ZedZedZedZdZedZdZ dd Z
d d
Zdd Zd
S )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 semanage 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 C sB |d j d}t|dkr&td| S td|d |d f S d 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 )splitlen_)selfavcZoptionsZports r
//usr/share/setroubleshoot/plugins/bind_ports.pyget_do_text2 s
zplugin.get_do_textc C s t j| t | jd d S )Nd )r __init____name__Zset_priority)r r
r
r r : s zplugin.__init__c C sN |j ddddgrJ|jdgrJ|j }|rJ| j|jjdd dj|fS d S ) NZhi_reserved_port_tZreserved_port_tZport_tZunreserved_port_tZ name_bindr
r z, )Zmatches_target_typesZhas_any_access_inZallowed_target_typesZreportZtclassr join)r r Z
allowed_typesr
r
r analyze> s zplugin.analyzeN)
r
__module____qualname__r
ZsummaryZproblem_descriptionZfix_descriptionZfix_cmdZif_textZ then_textr r r r
r
r
r r s r )gettextZtranslationr
Zsetroubleshoot.utilZsetroubleshoot.Pluginr r r
r
r
r s