HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/share/setroubleshoot/plugins/__pycache__/qemu_file_image.cpython-39.pyc
a

�Z`��@sDddlZejddd�ZejZddlTddlmZGdd�de�ZdS)	�Nzsetroubleshoot-pluginsT)Zfallback)�*)�Pluginc@sLeZdZed�Zed�Zed�ZdZed�Zed�Z	dZ
dd	�Zd
d�ZdS)
�pluginzN
    SELinux is preventing $SOURCE_PATH "$ACCESS" access to $TARGET_PATH.
    a�
    SELinux denied svirt access to $TARGET_PATH.
    If this is a virtualization image, it has to have a file context label of
    virt_image_t. The system is setup to label image files in directory./var/lib/libvirt/images
    correctly.  We recommend that you copy your image file to /var/lib/libvirt/images.
    If you really want to have your image files in the current directory, you can relabel $TARGET_PATH to be virt_image_t using chcon.  You also need to execute semanage fcontext -a -t virt_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 virtualization
    image it could indicate either a bug or an intrusion attempt.
    a

    You can alter the file context by executing chcon -t virt_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 virt_image_t '$FIX_TARGET_PATH'"
    z-/usr/bin/chcon -t virt_image_t '$TARGET_PATH'z/If $TARGET_BASE_PATH is a virtualization targetz2You need to change the label on $TARGET_BASE_PATH'z\# semanage fcontext -a -t virt_image_t '$FIX_TARGET_PATH'
# restorecon -v '$FIX_TARGET_PATH'cCs*t�|t�|�d�d|_td�|_dS)N�<Tz$Set the image label to virt_image_t.)r�__init__�__name__Zset_priorityZfixable�_Zbutton_text)�self�r
�4/usr/share/setroubleshoot/plugins/qemu_file_image.pyr5s
zplugin.__init__cCsD|�dg�r<|�|j|j�r<|�ddg�r<|��r<|��SdSdS)NZsvirt_t�file�dir)Zmatches_source_typesZall_accesses_are_inZ
rw_file_permsZr_dir_permsZ
has_tclass_inZpath_is_not_standard_directoryZreport)r	Zavcr
r
r�analyze;s���zplugin.analyzeN)
r�
__module__�__qualname__rZsummaryZproblem_descriptionZfix_descriptionZfix_cmdZif_textZ	then_textZdo_textrrr
r
r
rrs
r)�gettextZtranslationrZsetroubleshoot.utilZsetroubleshoot.Pluginrrr
r
r
r�<module>s