File: //usr/share/setroubleshoot/plugins/__pycache__/file.cpython-36.pyc
3
nm�a� � @ sD d dl Z e jddd�Zej Zd dlT d dlmZ G dd� de�ZdS ) � Nzsetroubleshoot-pluginsT)Zfallback)�*)�Pluginc @ s\ e Zd Zed�Zed�Zed�Zdd� Zdd� Zdd � Z d
d� Z
dd
� Zdd� Zdd� Z
dS )�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 C s |dkrt d�S t d�S 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.)r r )�_)�self�avc�args� r
�)/usr/share/setroubleshoot/plugins/file.py�get_if_text/ s zplugin.get_if_textc C s |dkrt d�S t d�S d S )Nr r zyou need to add labels to it.zyou need to fully relabel.)r r )r )r r r r
r
r �
get_then_text5 s zplugin.get_then_textc C s |dkrdS dS d S )Nr r z#/sbin/restorecon -R -v $TARGET_PATHztouch /.autorelabel; reboot)r r r
)r r r r
r
r �get_do_text; s zplugin.get_do_textc C s |dkrdS dS d S )Nr r z#/sbin/restorecon -R -v $TARGET_PATHztouch /.autorelabel; reboot)r r r
)r r r r
r
r �get_fix_cmdA s zplugin.get_fix_cmdc C s6 |dkrt d�| _| jd� nt d�| _| jd� d S )Nr r zTry to fix the label.�F z/Relabel the whole file system. Includes reboot!� )r r )r Zbutton_textZset_priority)r r r
r
r � init_argsG s
zplugin.init_argsc C s t j| t� d| _d| _d S )NZgreenT)r �__init__�__name__�levelZfixable)r r
r
r r O s zplugin.__init__c C s<