HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/share/setroubleshoot/plugins/__pycache__/connect_ports.cpython-36.pyc
3

m��a�
�@sDddlZejddd�ZejZddlTddlmZGdd�de�ZdS)	�Nzsetroubleshoot-pluginsT)Zfallback)�*)�Pluginc@sLeZdZed�Zed�Zed�ZdZed�ZdZ	dd�Z
d	d
�Zdd�Zd
S)�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.cCsB|djd�}t|�dkr&td�|Std�|d|dfSdS)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�avcZoptionsZports�r
�2/usr/share/setroubleshoot/plugins/connect_ports.py�get_do_text0s

zplugin.get_do_textcCstj|t�|jd�dS)N�d)r�__init__�__name__Zset_priority)rr
r
rr8szplugin.__init__cCsN|jddddg�rJ|jdg�rJ|j�}|rJ|j|jjd�ddj|�f�SdS)	NZhi_reserved_port_tZreserved_port_tZport_tZunreserved_port_tZname_connectr
rz, )Zmatches_target_typesZhas_any_access_inZallowed_target_typesZreportZtclassr�join)rrZ
allowed_typesr
r
r�analyze<s zplugin.analyzeN)
r�
__module__�__qualname__r
ZsummaryZproblem_descriptionZfix_descriptionZfix_cmdZif_textZ	then_textrrrr
r
r
rrsr)�gettextZtranslationr
Zsetroubleshoot.utilZsetroubleshoot.Pluginrrr
r
r
r�<module>s