dbfdg 3 nma @sTddlZejdddZejZddlTddlmZddlZddlTGdddeZdS) Nzsetroubleshoot-pluginsT)Zfallback)*)Pluginc@sLeZdZedZedZedZddZddZdd Z d d Z d d Z dS)pluginzN SELinux is preventing $SOURCE_PATH "$ACCESS" access to $TARGET_PATH. z SELinux denied access requested by $SOURCE. $TARGET_PATH may be mislabeled. openvpn is allowed to read content in home directory if it is labeled correctly. z You can restore the default system context to this file by executing the restorecon command. # restorecon -R /root/.ssh cCs |ddkrtdStdSdS)NrmovezjIf you want to mv $TARGET_BASE_PATH to standard location so that $SOURCE_BASE_PATH can have $ACCESS accesszlIf you want to modify the label on $TARGET_BASE_PATH so that $SOURCE_BASE_PATH can have $ACCESS access on it)_)selfavcargsr ,/usr/share/setroubleshoot/plugins/openvpn.py get_if_text/s zplugin.get_if_textcCs |ddkrtdStdSdS)Nrrz4you must move the cert file to the ~/.cert directoryzyou must fix the labels.)r)rrr r r r get_then_text5s zplugin.get_then_textcCs|ddkrdSdSdS)Nrrz5# mv $TARGET_PATH ~/.cert # restorecon -R -v ~/.cert zS# semanage fcontext -a -t home_cert_t $TARGET_PATH # restorecon -R -v $TARGET_PATH r )rrr r r r get_do_text;s zplugin.get_do_textcCs tj|t|jdd|_dS)NZyellow)r__init____name__Z set_prioritylevel)rr r r rEs  zplugin.__init__cCsJ|jdgrF|jddgrF|j|jrF|jdgrF|jd|jdgSdS) NZ openvpn_tZ user_home_tZ user_tmp_tfilerfixlabel)rN)rN)Zmatches_source_typesZmatches_target_typesZall_accesses_are_inZread_file_permsZ has_tclass_inZreport)rrr r r analyzeJs    zplugin.analyzeN) r __module__ __qualname__rZsummaryZproblem_descriptionZfix_descriptionr r rrrr r r r rs r) gettextZ translationrZsetroubleshoot.utilZsetroubleshoot.Pluginrosstatrr r r r s