HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/share/setroubleshoot/plugins/__pycache__/allow_execmem.cpython-39.opt-1.pyc
a

�Z`H�@sTddlZddlTddlZejddd�ZejZddlTddlmZGdd�de�ZdS)	�N)�*zsetroubleshoot-pluginsT)Zfallback)�Pluginc@sdeZdZed�Zed�ZdZdZdZdZ	dZ
dZd	d
�Zdd�Z
d
d�Zdd�Zdd�Zdd�ZdS)�pluginzX
    SELinux is preventing $SOURCE_PATH from creating an executable memory mapping.
    a�
    The $SOURCE application attempted to create an anonymous executable memory mapping,
    or a writable executable file mapping. This is a potential security problem. Most
    applications do not need this permission. The 
    <a href="http://people.redhat.com/drepper/selinux-mem.html">SELinux Memory Protection Tests</a>
    web page explains why SELinux intervened and how to work around it if needed.
    z6If this issue occurred during normal system operation.zIThis alert could be a serious issue and your system could be compromised.z9Contact your security administrator and report this issuez�If you know why $SOURCE needs to map a memory region that is both executable and writable and understand that this is a potential security problem.zFYou can allow the mapping by switching one of the following booleans: zuFollow the advice of the catchall_boolean plugin, otherwise contact your security administrator and report this issuecCs|jS)N)�problem_description��self�avc�args�r
�2/usr/share/setroubleshoot/plugins/allow_execmem.py�get_problem_description5szplugin.get_problem_descriptioncCst|�dkr|jS|jS�Nr)�len�if_text�unsafe_if_textrr
r
r�get_if_text8szplugin.get_if_textcCs"t|�dkr|jd�|�S|jS)Nrz, )r�	then_text�join�unsafe_then_textrr
r
r�
get_then_text=szplugin.get_then_textcCst|�dkr|jS|jSr
)r�do_text�unsafe_do_textrr
r
r�get_do_textBszplugin.get_do_textcCs&t�|t�d|_d|_|�d�dS)NFT�
)r�__init__�__name__ZfixableZ
report_bugZset_priority)rr
r
rrGszplugin.__init__cCsDddl}|�dg�r@t|j�dkr8|�dd�|jD��S|��SdS)NrZexecmemcSsg|]}|d�qS)rr
)�.0�br
r
r�
<listcomp>R�z"plugin.analyze.<locals>.<listcomp>)�
subprocessZhas_any_access_inrZboolsZreport)rrr r
r
r�analyzeMszplugin.analyzeN)r�
__module__�__qualname__�_Zsummaryrrrrrrrrrrrrr!r
r
r
rrsr)	Zselinux�stat�gettextZtranslationr$Zsetroubleshoot.utilZsetroubleshoot.Pluginrrr
r
r
r�<module>s