← Back
Editing: xen_image.cpython-312.pyc
� �Z`4 � �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 ) �pluginzT SELinux is preventing xen ($SOURCE_PATH) "$ACCESS" access to $TARGET_PATH. a� SELinux denied xen access to $TARGET_PATH. If this is a XEN image, it has to have a file context label of xen_image_t. The system is setup to label image files in directory /var/lib/xen/images correctly. We recommend that you copy your image file to /var/lib/xen/images. If you really want to have your xen image files in the current directory, you can relabel $TARGET_PATH to be xen_image_t using chcon. You also need to execute semanage fcontext -a -t xen_image_t '$FIX_TARGET_PATH' to add this new path to the system defaults. If you did not intend to use $TARGET_PATH as a xen image it could indicate either a bug or an intrusion attempt. a You can alter the file context by executing chcon -t xen_image_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 xen_image_t '$FIX_TARGET_PATH'" z,/usr/bin/chcon -t xen_image_t '$TARGET_PATH'z2You need to change the label on '$FIX_TARGET_PATH'z[# semanage fcontext -a -t xen_image_t '$FIX_TARGET_PATH' # restorecon -v '$FIX_TARGET_PATH'c �f � t j | t � d| _ t d� | _ y )NTz%Change the file label to xen_image_t.)r �__init__�__name__�fixable�_�button_text)�selfs �./usr/share/setroubleshoot/plugins/xen_image.pyr zplugin.__init__5 s% � �����h�'�����D�E��� c �� � |j ddg� r[|j |j |j z � r3|j ddg� r |j � r| j � S y )N�xend_t�virsh_t�file�dir)�matches_source_types�all_accesses_are_in�r_file_perms�r_dir_perms� has_tclass_in�path_is_not_standard_directory�report)r �avcs r �analyzezplugin.analyze: s_ � ��$�$�h� �%:�;��#�#�C�$4�$4�s���$F�G����v�u�o�.��.�.�0��;�;�=� �r N)r � __module__�__qualname__r �summary�problem_description�fix_description�fix_cmd� then_text�do_textr r � r r r r sX � � � � �G� � � �� � � �O� =�G��F�G�I�&�G�F� r r )�gettext�translationr �setroubleshoot.util�setroubleshoot.Pluginr r r'