dbfdg 3 nma@sDddlZejdddZejZddlTddlmZGdddeZdS) Nzsetroubleshoot-pluginsT)Zfallback)*)Pluginc@sDeZdZedZedZedZdZedZdZ ddZ d d Z d S) pluginzG SELinux is preventing $SOURCE_PATH "$ACCESS" to $TARGET_PATH. a  SELinux denied $SOURCE access to $TARGET_PATH. If this is a swapfile, it has to have a file context label of swapfile_t. If you did not intend to use $TARGET_PATH as a swapfile, this message could indicate either a bug or an intrusion attempt. a  You can alter the file context by executing chcon -t swapfile_t '$TARGET_PATH' You must also change the default file context files on the system in order to preserve them even on a full relabel. "semanage fcontext -a -t swapfile_t '$FIX_TARGET_PATH'" z"chcon -t swapfile_t '$TARGET_PATH'z2You need to change the label on '$FIX_TARGET_PATH'zZ# semanage fcontext -a -t swapfile_t '$FIX_TARGET_PATH' # restorecon -v '$FIX_TARGET_PATH'cCstj|td|_dS)NZgreen)r__init____name__level)selfr -/usr/share/setroubleshoot/plugins/swapfile.pyr0s zplugin.__init__cCs:|jdgr2|jddddgr2|jdgr2|jSdSdS)NZfsadm_treadwritegetattrZswaponfile)Zmatches_source_typesZall_accesses_are_inZ has_tclass_inZreport)rZavcr r r analyze4s   zplugin.analyzeN) r __module__ __qualname___ZsummaryZproblem_descriptionZfix_descriptionZfix_cmdZ then_textZdo_textrrr r r r rsr)gettextZ translationrZsetroubleshoot.utilZsetroubleshoot.Pluginrrr r r r s