Server IP : 184.154.167.98 / Your IP : 18.188.218.219 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 8.2.26 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/setroubleshoot/plugins/__pycache__/ |
Upload File : |
3 nm�a� � @ 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 j| t� | jd� 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 j|d �}t|tj�s(tj|dd�}td�|d j� |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 sV t d�|d }y,|d r:|d dkr:|t d�|d 7 }W n tk rP Y nX |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 sv | j |jj�}t|j�dkrrg }| j}d}|j}x<|D ]4}|sL| j |d �}|j| j|d |d |f�� q6W |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