← Back
Editing: swapfile.cpython-312.opt-1.pyc
� �Z`� � �x � d dl Z e j dd�� Zej Zd dl� d dlmZ G d� de� Zy) � Nzsetroubleshoot-pluginsT)�fallback)�*)�Pluginc �` � e Zd Z ed� Z ed� Z ed� ZdZ ed� ZdZ d� Z d� Zy ) �pluginzG SELinux is preventing $SOURCE_PATH "$ACCESS" to $TARGET_PATH. a SELinux denied $SOURCE access to $TARGET_PATH. If this is a swapfile, it has to have a file context label of swapfile_t. If you did not intend to use $TARGET_PATH as a swapfile, this message could indicate either a bug or an intrusion attempt. a You can alter the file context by executing chcon -t swapfile_t '$TARGET_PATH' You must also change the default file context files on the system in order to preserve them even on a full relabel. "semanage fcontext -a -t swapfile_t '$FIX_TARGET_PATH'" z"chcon -t swapfile_t '$TARGET_PATH'z2You need to change the label on '$FIX_TARGET_PATH'zZ# semanage fcontext -a -t swapfile_t '$FIX_TARGET_PATH' # restorecon -v '$FIX_TARGET_PATH'c �F � t j | t � d| _ y )N�green)r �__init__�__name__�level)�selfs �-/usr/share/setroubleshoot/plugins/swapfile.pyr zplugin.__init__0 s � �����h�'��� � c � � |j dg� r5|j g d�� r"|j dg� r| j � S y )N�fsadm_t)�read�write�getattr�swapon�file)�matches_source_types�all_accesses_are_in� has_tclass_in�report)r �avcs r �analyzezplugin.analyze4 s@ � ��$�$�i�[�1��#�#�$J�K����v�h�'��;�;�=� �r N)r � __module__�__qualname__�_�summary�problem_description�fix_description�fix_cmd� then_text�do_textr r � r r r r sW � � � � �G� � � �� � � �O� 3�G��F�G�I�&�G��r r )�gettext�translationr �setroubleshoot.util�setroubleshoot.Pluginr r r&