a Z` @sDddlZejdddZejZddlTddlmZGdddeZdS) Nzsetroubleshoot-pluginsT)Zfallback)*)Pluginc@s\eZdZedZedZedZddZddZdd Z d d Z d d Z ddZ ddZ 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" cCs|dkrtdStdSdS)Nrz.This is caused by a newly created file system.z:If you think this is caused by a badly mislabeled machine._selfavcargsr )/usr/share/setroubleshoot/plugins/file.py get_if_text/szplugin.get_if_textcCs|dkrtdStdSdS)Nrzyou need to add labels to it.zyou need to fully relabel.rr r r r get_then_text5szplugin.get_then_textcCs|dkr dSdSdSNrz#/sbin/restorecon -R -v $TARGET_PATHztouch /.autorelabel; rebootr r r r r get_do_text;szplugin.get_do_textcCs|dkr dSdSdSrr r r r r get_fix_cmdAszplugin.get_fix_cmdcCs6|dkrtd|_|dntd|_|ddS)NrzTry to fix the label.Fz/Relabel the whole file system. Includes reboot!)rZ button_textZ set_priority)r r r r r init_argsGs    zplugin.init_argscCst|td|_d|_dS)NZgreenT)r__init____name__levelZfixable)r r r rrOs zplugin.__init__cCs<|dgr4g}||d||d|SdSdS)NZ unlabeled_tr)r)Zmatches_target_typesappendZreport)r r Zreportsr r ranalyzeTs  zplugin.analyzeN)r __module__ __qualname__rZsummaryZproblem_descriptionZfix_descriptionrrrrrrrr r r rrs r)gettextZ translationrZsetroubleshoot.utilZsetroubleshoot.Pluginrrr r r rs