관리-도구
편집 파일: catchall_boolean.cpython-39.pyc
a �����Z`�����������������������@���s\���d�dl�Z�d�dlZd�dlZe�jddd�Zej�Zd�dlT�d�dlmZ�d�dlZG�dd��de�Z dS�) �����Nzsetroubleshoot-pluginsT)Zfallback)�*)�Pluginc�������������������@���sP���e�Zd�Zed�Zed�Zed�ZdZdd��Zdd��Z d d ��Z dd��Zd d��ZdS�)�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�����������������C���s ���t��|�t��|��d��d|�_d�S�)N����Zyellow)r����__init__�__name__Zset_priority�level)�self��r����5/usr/share/setroubleshoot/plugins/catchall_boolean.pyr���6���s���� zplugin.__init__c�����������������C���sH���t��|d��}t|tj�s(tj|dd�}td�|d����|dd�����S�)Nr����utf8)�encodingzIf you want to %s����)�sepolicyZboolean_desc� isinstance�sixZ text_type�_�lower)r ����avc�argsZtxtr���r���r����get_if_text;���s����zplugin.get_if_textc�����������������C���s���t�d�|d�|d�f�S�)Nzsetsebool -P %s %sr���r���)r���)r ���r���r���r���r���r����get_do_textA���s����zplugin.get_do_textc�����������������C���sT���t�d�|d��}z,|d�r:|d�dkr:|t�d�|d��7�}W�n�tyN���Y�n0�|S�)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����textr���r���r���� get_then_textD���s����zplugin.get_then_textc�����������������C���sr���|���|jj�}t|j�dkrng�}|�j}d}|j}|D�]4}|sJ|���|d��}|�|��|d�|d�|f���q4|S�d�S�)Nr���r���r���)Z check_for_manZscontext�type�len�bools�fix_description�appendZreport)r ���r���Zman_pageZreportsZfix�fix_cmdr ����br���r���r����analyzeN���s���� zplugin.analyzeN) r���� __module__�__qualname__r���ZsummaryZproblem_descriptionr!���r#���r���r���r���r���r%���r���r���r���r���r��� ���s��� r���) �gettext�osr���Ztranslationr���Zsetroubleshoot.utilZsetroubleshoot.Pluginr���r���r���r���r���r���r����<module>���s���