← Back
Editing: file.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 �f � e Zd Z ed� Z ed� Z ed� Zd� Zd� Zd� Z d� Z d� Zd � Zd � Z y)�pluginzE SELinux is preventing access to a file labeled unlabeled_t. aT SELinux permission checks on files labeled unlabeled_t are being denied. unlabeled_t is a context the SELinux kernel gives to files that do not have a label. This indicates a serious labeling problem. No files on an SELinux box should ever be labeled unlabeled_t. If you have just added a disk drive to the system, you can relabel it using the restorecon command. For example if you saved the home directory from a previous installation that did not use SELinux, 'restorecon -R -v /home' will fix the labels. Otherwise you should relabel the entire file system. zz You can execute the following command as root to relabel your computer system: "touch /.autorelabel; reboot" c �8 � |dk( rt d� S t d� S )N�� r z.This is caused by a newly created file system.z:If you think this is caused by a badly mislabeled machine.��_��self�avc�argss �)/usr/share/setroubleshoot/plugins/file.py�get_if_textzplugin.get_if_text/ s! � ��5�=��E�F�F��Q�R�R� c �8 � |dk( rt d� S t d� S )Nr zyou need to add labels to it.zyou need to fully relabel.r r s r � get_then_textzplugin.get_then_text5 s! � ��5�=��4�5�5��1�2�2r c � � |dk( ryy�Nr z#/sbin/restorecon -R -v $TARGET_PATHztouch /.autorelabel; reboot� r s r �get_do_textzplugin.get_do_text; � � ��5�=�8�0r c � � |dk( ryyr r r s r �get_fix_cmdzplugin.get_fix_cmdA r r c � � |dk( r"t d� | _ | j d� y t d� | _ | j d� y )Nr zTry to fix the label.�F z/Relabel the whole file system. Includes reboot!� )r �button_text�set_priority)r r s r � init_argszplugin.init_argsG sA � ��5�=� �!8�9�D�����b�!� �!R�S�D�����b�!r c �T � t j | t � d| _ d| _ y )N�greenT)r �__init__�__name__�level�fixable)r s r r% zplugin.__init__O s � �����X�&��� ���r c � � |j dg� rDg }|j | j d� � |j | j d� � |S y )N�unlabeled_tr )� r )�matches_target_types�append�report)r r �reportss r �analyzezplugin.analyzeT sI � ��#�#�]�O�4��G��N�N�4�;�;�u�-�.��N�N�4�;�;�u�-�.��N�r N)r&