← Back
Editing: catchall_boolean.cpython-312.pyc
� �Z`� � � � d dl Z d dlZd dlZ e j dd�� Zej Zd dl� d dlmZ d dlZ G d� de� Z y) � Nzsetroubleshoot-pluginsT)�fallback)�*)�Pluginc �^ � e Zd Z ed� Z ed� Z ed� ZdZd� Zd� Z d� Z d� Zd � Zy )�pluginzN SELinux is preventing $SOURCE_PATH "$ACCESS" access on $TARGET_PATH. a: SELinux denied access requested by $SOURCE. The current boolean settings do not allow this access. If you have not setup $SOURCE to require this access this may signal an intrusion attempt. If you do intend this access you need to change the booleans on this system to allow the access. z� Confined processes can be configured to run requiring different access, SELinux provides booleans to allow you to turn on/off access as needed. � c �h � t j | t � | j d� d| _ y )N� �yellow)r �__init__�__name__�set_priority�level)�selfs �5/usr/share/setroubleshoot/plugins/catchall_boolean.pyr zplugin.__init__6 s% � �����h�'����!���� � c �� � t j |d � }t |t j � st j |d�� }t d� |d j � |dd z z S )Nr �utf8)�encodingzIf you want to %s� )�sepolicy�boolean_desc� isinstance�six� text_type�_�lower)r �avc�args�txts r �get_if_textzplugin.get_if_text; sZ � ��!�!�$�q�'�*���#�s�}�}�-�� � �c�F�3�C��$�%��Q�����#�a�b�'�)A�B�Br c �. � t d� |d |d fz S )Nzsetsebool -P %s %sr r )r )r r r s r �get_do_textzplugin.get_do_textA s � ��%�&�$�q�'�4��7�);�;�;r c � � t d� |d z } |d r|d dk7 r|t d� |d z z }|S # t $ r Y |S w xY w)Nz?You must tell SELinux about this by enabling the '%s' boolean. r � �Nonez,You can read '%s' man page for more details.)r � IndexError)r r r �texts r � get_then_textzplugin.get_then_textD sj � ��S�T�W[�\]�W^�^�� ��A�w�4��7�f�,���H�I�D�QR�G�S�S�� ��� � ���� �s �!6 � A�Ac �F � | j |j j � }t |j � dkD rdg }| j }d}|j }|D ]A }|s| j |d � }|j | j |d |d |f� � �C |S y )Nr r r )� check_for_man�scontext�type�len�bools�fix_description�append�report)r r �man_page�reports�fix�fix_cmdr/ �bs r �analyzezplugin.analyzeN s� � ��%�%�c�l�l�&7�&7�8���� � �N�Q���G��&�&�C��G��I�I�E����#�1�1�!�A�$�7�H����t�{�{�A�a�D�!�A�$��+A�B�C� � �N�r N) r � __module__�__qualname__r �summary�problem_descriptionr0 r6 r r! r# r) r8 � r r r r sU � �� � �G� � � �� � � �O� �G�� C�<�� r r ) �gettext�osr �translationr �setroubleshoot.util�setroubleshoot.Pluginr r r r= r r �<module>rC sE ��, � � ��G��� 8�4�H�� ���� !� (� �;�V� ;r
Save File
Cancel