HEX
Server: Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System: Linux ns565604.ip-54-39-133.net 4.18.0-553.50.1.el8_10.x86_64 #1 SMP Tue Apr 15 08:09:22 EDT 2025 x86_64
User: greer489 (1034)
PHP: 8.3.19
Disabled: NONE
Upload Files
File: //usr/share/setroubleshoot/plugins/__pycache__/allow_execmem.cpython-36.opt-1.pyc
3

nm�aH�@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_text)rrrr	r	r
�get_if_text8szplugin.get_if_textcCs"t|�dkr|jdj|�S|jS)Nrz, )r�	then_text�join�unsafe_then_text)rrrr	r	r
�
get_then_text=szplugin.get_then_textcCst|�dkr|jS|jS)Nr)r�do_text�unsafe_do_text)rrrr	r	r
�get_do_textBszplugin.get_do_textcCs&tj|t�d|_d|_|jd�dS)NFT�
)r�__init__�__name__ZfixableZ
report_bugZset_priority)rr	r	r
rGszplugin.__init__cCsDddl}|jdg�r@t|j�dkr8|jdd�|jD��S|j�SdS)NrZexecmemcSsg|]}|d�qS)rr	)�.0�br	r	r
�
<listcomp>Rsz"plugin.analyze.<locals>.<listcomp>)�
subprocessZhas_any_access_inrZboolsZreport)rrrr	r	r
�analyzeMszplugin.analyzeN)r�
__module__�__qualname__�_Zsummaryrrrrr
rrrrrrrrr	r	r	r
rs r)	Zselinux�stat�gettextZtranslationr!Zsetroubleshoot.utilZsetroubleshoot.Pluginrrr	r	r	r
�<module>s