← Back
Editing: httpd_unified.cpython-312.pyc
� �Z`u � �v � d dl Z e j dd�� Zej Zd dlZd dlmZ G d� de� Zy)� Nzsetroubleshoot-pluginsT)�fallback)�Pluginc �p � e Zd Z ed� Z ed� Z ed� ZdZ ed� Z ed� Z dZ d� Zd � Zy )�pluginz? SELinux prevented httpd $ACCESS access to http files. aZ SELinux prevented httpd $ACCESS access to http files. Ordinarily httpd is allowed full access to all files labeled with http file context. This machine has a tightened security policy with the $BOOLEAN turned off, this requires explicit labeling of all files. If a file is a cgi script it needs to be labeled with httpd_TYPE_script_exec_t in order to be executed. If it is read only content, it needs to be labeled httpd_TYPE_content_t. If it is writable content, it needs to be labeled httpd_TYPE_script_rw_t or httpd_TYPE_script_ra_t. You can use the chcon command to change these context. Please refer to the man page "man httpd_selinux" or <a href="http://fedora.redhat.com/docs/selinux-apache-fc3">FAQ</a> "TYPE" refers to one of "sys", "user" or "staff" or potentially other script types. zg Changing the "$BOOLEAN" boolean to true will allow this access: "setsebool -P $BOOLEAN=1" zsetsebool -P $BOOLEAN=1zcIf you want to allow httpd to execute cgi scripts and to unify HTTPD handling of all content files.z_you must tell SELinux about this by enabling the 'httpd_unified' and 'http_enable_cgi' booleansz1# setsebool -P httpd_unified=1 httpd_enable_cgi=1c �Z � t j | t � | j d� y )N� )r �__init__�__name__�set_priority)�selfs �2/usr/share/setroubleshoot/plugins/httpd_unified.pyr zplugin.__init__= s � �����h�'����!�� c � � |j d� ri|j d� rX|j dk( s|j dk( r:t j d� s%t j d� s| j � S y )Nzhttpd_t httpd_.*_script_tz httpd_.*t�file�dir� httpd_unified�httpd_enable_cgi)�matches_source_types�matches_target_types�tclass�selinux�security_get_boolean_active�report)r �avcs r �analyzezplugin.analyzeA sb � ��$�$�%@�A��#�#�K�0��J�J�&� �C�J�J�%�$7��4�4�_�E��4�4�5G�H��;�;�=� �r N) r � __module__�__qualname__�_�summary�problem_description�fix_description�fix_cmd�if_text� then_text�do_textr r � r r r r s` � �� � �G� � � ��"