관리-도구
편집 파일: file.cpython-39.pyc
a �Z`� � @ 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.��_��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 zyou need to add labels to it.zyou need to fully relabel.r r r r r � get_then_text5 s zplugin.get_then_textc C s |dkrdS dS d S �Nr z#/sbin/restorecon -R -v $TARGET_PATHztouch /.autorelabel; rebootr r r r r �get_do_text; s zplugin.get_do_textc C s |dkrdS dS d S r r r r r r �get_fix_cmdA s zplugin.get_fix_cmdc C s6 |dkrt d�| _| �d� nt d�| _| �d� d S )Nr zTry to fix the label.�F z/Relabel the whole file system. Includes reboot!� )r Zbutton_textZset_priority)r r r r r � init_argsG s zplugin.init_argsc C s t �| t� d| _d| _d S )NZgreenT)r �__init__�__name__�levelZfixable)r r r r r O s zplugin.__init__c C s<