← Back
Editing: allow_execmem.cpython-312.pyc
� �Z`H � � � d dl Z d dl� d dlZ ej dd�� Zej Zd dl� d dlmZ G d� de� Zy) � N)�*zsetroubleshoot-pluginsT)�fallback)�Pluginc �h � e Zd Z ed� Z ed� ZdZdZdZdZ dZ dZd � Zd � Z d� Zd� Zd � Zd� Zy)�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 issuec � � | j S )N)�problem_description��self�avc�argss �2/usr/share/setroubleshoot/plugins/allow_execmem.py�get_problem_descriptionzplugin.get_problem_description5 s � ��'�'�'� c �N � t |� dkD r| j S | j S �Nr )�len�if_text�unsafe_if_textr s r �get_if_textzplugin.get_if_text8 �# � ��t�9�q�=��<�<���"�"�"r c �r � t |� dkD r| j dj |� z S | j S )Nr z, )r � then_text�join�unsafe_then_textr s r � get_then_textzplugin.get_then_text= s0 � ��t�9�q�=��>�>�D�I�I�d�O�3�3��$�$�$r c �N � t |� dkD r| j S | j S r )r �do_text�unsafe_do_textr s r �get_do_textzplugin.get_do_textB r r c �v � t j | t � d| _ d| _ | j d� y )NFT� )r �__init__�__name__�fixable� report_bug�set_priority)r s r r# zplugin.__init__G s, � �����X�&����������"�r c �� � dd l }|j dg� rTt |j � dkD r,| j |j D �cg c] }|d �� c}� S | j � S y c c}w )Nr �execmem)� subprocess�has_any_access_inr �bools�report)r r r* �bs r �analyzezplugin.analyzeM s_ � ��� � �)��-��3�9�9�~��!��{�{�#�)�)�#<�)�Q�A�a�D�)�#<�=�=��{�{�}�$��� $=s �A,N)r$ � __module__�__qualname__�_�summaryr r r r r r r r r r r r# r/ � r r r r si � � � � �G� � � �� N�N�b��P�N� d�G�X�I� F�G�(�#� %� #� �r r ) �selinux�stat�gettext�translationr2 �setroubleshoot.util�setroubleshoot.Pluginr r r4 r r �<module>r; sB ��&