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__/catchall_boolean.cpython-36.opt-1.pyc
3

nm�a��@s\ddlZddlZddlZejddd�ZejZddlTddlmZddlZGdd�de�Z	dS)	�Nzsetroubleshoot-pluginsT)Zfallback)�*)�Pluginc@sPeZdZed�Zed�Zed�ZdZdd�Zdd�Z	d	d
�Z
dd�Zd
d�ZdS)�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.

    �cCs tj|t�|jd�d|_dS)N�Zyellow)r�__init__�__name__Zset_priority�level)�self�r�5/usr/share/setroubleshoot/plugins/catchall_boolean.pyr6s
zplugin.__init__cCsHtj|d�}t|tj�s(tj|dd�}td�|dj�|dd�S)Nr�utf8)�encodingzIf you want to %s�)�sepolicyZboolean_desc�
isinstance�sixZ	text_type�_�lower)r
�avc�argsZtxtrrr�get_if_text;szplugin.get_if_textcCstd�|d|dfS)Nzsetsebool -P %s %srr)r)r
rrrrr�get_do_textAszplugin.get_do_textcCsVtd�|d}y,|dr:|ddkr:|td�|d7}Wntk
rPYnX|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
rr�textrrr�
get_then_textDszplugin.get_then_textcCsv|j|jj�}t|j�dkrrg}|j}d}|j}x<|D]4}|sL|j|d�}|j|j|d|d|f��q6W|SdS)Nrrr)Z
check_for_manZscontext�type�len�bools�fix_description�appendZreport)r
rZman_pageZreportsZfix�fix_cmdr �brrr�analyzeNs
"zplugin.analyzeN)
r�
__module__�__qualname__rZsummaryZproblem_descriptionr!r#rrrrr%rrrrr s
r)
�gettext�osrZtranslationrZsetroubleshoot.utilZsetroubleshoot.Pluginrrrrrrr�<module>s