dbfdg 3 nmŠaฺ ใ@sDddlZejdddZejZddlTddlmZGdd„deƒZdS) ้Nzsetroubleshoot-pluginsT)Zfallback)ฺ*)ฺPluginc@s\eZdZedƒZedƒZedƒZdd„Zdd„Zdd „Z d d „Z d d „Z dd„Z dd„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" cCs|dkrtdƒStdƒSdS)N้rz.This is caused by a newly created file system.z:If you think this is caused by a badly mislabeled machine.)rr)ฺ_)ฺselfฺavcฺargsฉr ๚)/usr/share/setroubleshoot/plugins/file.pyฺ get_if_text/szplugin.get_if_textcCs|dkrtdƒStdƒSdS)Nrrzyou need to add labels to it.zyou need to fully relabel.)rr)r)rrr r r r ฺ get_then_text5szplugin.get_then_textcCs|dkr dSdSdS)Nrrz#/sbin/restorecon -R -v $TARGET_PATHztouch /.autorelabel; reboot)rrr )rrr r r r ฺ get_do_text;szplugin.get_do_textcCs|dkr dSdSdS)Nrrz#/sbin/restorecon -R -v $TARGET_PATHztouch /.autorelabel; reboot)rrr )rrr r r r ฺ get_fix_cmdAszplugin.get_fix_cmdcCs6|dkrtdƒ|_|jdƒntdƒ|_|jdƒdS)NrrzTry to fix the label.้Fz/Relabel the whole file system. Includes reboot!้)rr)rZ button_textZ set_priority)rr r r r ฺ init_argsGs    zplugin.init_argscCstj|tƒd|_d|_dS)NZgreenT)rฺ__init__ฺ__name__ฺlevelZfixable)rr r r rOs zplugin.__init__cCs<|jdgƒr4g}|j|jdƒƒ|j|jdƒƒ|SdSdS)NZ unlabeled_trr้)rr)rr)Zmatches_target_typesฺappendZreport)rrZreportsr r r ฺanalyzeTs  zplugin.analyzeN)rฺ __module__ฺ __qualname__rZsummaryZproblem_descriptionZfix_descriptionr r rrrrrr r r r rs r)ฺgettextZ translationrZsetroubleshoot.utilZsetroubleshoot.Pluginrrr r r r ฺs