Chris PeBenito 9401ae1
## <summary>Apache web server</summary>
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Create a set of derived types for apache
Chris PeBenito 9401ae1
##	web content.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="prefix">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	The prefix to be used for deriving type names.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
template(`apache_content_template',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		attribute httpdcontent;
Chris PeBenito 9401ae1
		attribute httpd_exec_scripts;
Chris PeBenito 9401ae1
		attribute httpd_script_exec_type;
Chris PeBenito 9401ae1
		type httpd_t, httpd_suexec_t, httpd_log_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
	# allow write access to public file transfer
Chris PeBenito 9401ae1
	# services files.
Chris PeBenito 9401ae1
	gen_tunable(allow_httpd_$1_script_anon_write, false)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	#This type is for webpages
Chris PeBenito 9401ae1
	type httpd_$1_content_t, httpdcontent; # customizable
Chris PeBenito 9401ae1
	typealias httpd_$1_content_t alias httpd_$1_script_ro_t;
Chris PeBenito 9401ae1
	files_type(httpd_$1_content_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	# This type is used for .htaccess files
Chris PeBenito 9401ae1
	type httpd_$1_htaccess_t; # customizable;
Chris PeBenito 9401ae1
	files_type(httpd_$1_htaccess_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	# Type that CGI scripts run as
Chris PeBenito 9401ae1
	type httpd_$1_script_t;
Chris PeBenito 9401ae1
	domain_type(httpd_$1_script_t)
Chris PeBenito 9401ae1
	role system_r types httpd_$1_script_t;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	# This type is used for executable scripts files
Chris PeBenito 9401ae1
	type httpd_$1_script_exec_t, httpd_script_exec_type; # customizable;
Chris PeBenito 9401ae1
	corecmd_shell_entry_type(httpd_$1_script_t)
Chris PeBenito 9401ae1
	domain_entry_file(httpd_$1_script_t, httpd_$1_script_exec_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	type httpd_$1_rw_content_t, httpdcontent; # customizable
Chris PeBenito 9401ae1
	typealias httpd_$1_rw_content_t alias { httpd_$1_script_rw_t httpd_$1_content_rw_t };
Chris PeBenito 9401ae1
	files_type(httpd_$1_rw_content_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	type httpd_$1_ra_content_t, httpdcontent; # customizable
Chris PeBenito 9401ae1
	typealias httpd_$1_ra_content_t alias { httpd_$1_script_ra_t httpd_$1_content_ra_t };
Chris PeBenito 9401ae1
	files_type(httpd_$1_ra_content_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	read_files_pattern(httpd_t, httpd_$1_content_t, httpd_$1_htaccess_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	domtrans_pattern(httpd_suexec_t, httpd_$1_script_exec_t, httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow httpd_t { httpd_$1_content_t httpd_$1_rw_content_t httpd_$1_script_exec_t }:dir search_dir_perms;
Chris PeBenito 9401ae1
	allow httpd_suexec_t { httpd_$1_content_t httpd_$1_content_t httpd_$1_rw_content_t httpd_$1_script_exec_t }:dir search_dir_perms;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow httpd_$1_script_t self:fifo_file rw_file_perms;
Chris PeBenito 9401ae1
	allow httpd_$1_script_t self:unix_stream_socket connectto;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow httpd_$1_script_t httpd_t:fifo_file write;
Chris PeBenito 9401ae1
	# apache should set close-on-exec
Chris PeBenito 9401ae1
	dontaudit httpd_$1_script_t httpd_t:unix_stream_socket { read write };
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	# Allow the script process to search the cgi directory, and users directory
Chris PeBenito 9401ae1
	allow httpd_$1_script_t httpd_$1_content_t:dir search_dir_perms;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	append_files_pattern(httpd_$1_script_t, httpd_log_t, httpd_log_t)
Chris PeBenito 9401ae1
	logging_search_logs(httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	can_exec(httpd_$1_script_t, httpd_$1_script_exec_t)
Chris PeBenito 9401ae1
	allow httpd_$1_script_t httpd_$1_script_exec_t:dir list_dir_perms;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow httpd_$1_script_t httpd_$1_ra_content_t:dir { list_dir_perms add_entry_dir_perms };
Chris PeBenito 9401ae1
	read_files_pattern(httpd_$1_script_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
Chris PeBenito 9401ae1
	append_files_pattern(httpd_$1_script_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
Chris PeBenito 9401ae1
	read_lnk_files_pattern(httpd_$1_script_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow httpd_$1_script_t httpd_$1_content_t:dir list_dir_perms;
Chris PeBenito 9401ae1
	read_files_pattern(httpd_$1_script_t, httpd_$1_content_t, httpd_$1_content_t)
Chris PeBenito 9401ae1
	read_lnk_files_pattern(httpd_$1_script_t, httpd_$1_content_t, httpd_$1_content_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	manage_dirs_pattern(httpd_$1_script_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
Chris PeBenito 9401ae1
	manage_files_pattern(httpd_$1_script_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
Chris PeBenito 9401ae1
	manage_lnk_files_pattern(httpd_$1_script_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
Chris PeBenito 9401ae1
	manage_fifo_files_pattern(httpd_$1_script_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
Chris PeBenito 9401ae1
	manage_sock_files_pattern(httpd_$1_script_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
Chris PeBenito 9401ae1
	files_tmp_filetrans(httpd_$1_script_t, httpd_$1_rw_content_t, { dir file lnk_file sock_file fifo_file })
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	kernel_dontaudit_search_sysctl(httpd_$1_script_t)
Chris PeBenito 9401ae1
	kernel_dontaudit_search_kernel_sysctl(httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	dev_read_rand(httpd_$1_script_t)
Chris PeBenito 9401ae1
	dev_read_urand(httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	corecmd_exec_all_executables(httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	files_exec_etc_files(httpd_$1_script_t)
Chris PeBenito 9401ae1
	files_read_etc_files(httpd_$1_script_t)
Chris PeBenito 9401ae1
	files_search_home(httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	libs_exec_ld_so(httpd_$1_script_t)
Chris PeBenito 9401ae1
	libs_exec_lib_files(httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	miscfiles_read_fonts(httpd_$1_script_t)
Chris PeBenito 9401ae1
	miscfiles_read_public_files(httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	seutil_dontaudit_search_config(httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	tunable_policy(`httpd_enable_cgi && httpd_unified',`
Chris PeBenito 9401ae1
		allow httpd_$1_script_t httpdcontent:file entrypoint;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		manage_dirs_pattern(httpd_$1_script_t, httpdcontent, httpdcontent)
Chris PeBenito 9401ae1
		manage_files_pattern(httpd_$1_script_t, httpdcontent, httpdcontent)
Chris PeBenito 9401ae1
		manage_lnk_files_pattern(httpd_$1_script_t, httpdcontent, httpdcontent)
Chris PeBenito 9401ae1
		can_exec(httpd_$1_script_t, httpdcontent)
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	tunable_policy(`allow_httpd_$1_script_anon_write',`
Chris PeBenito 9401ae1
		miscfiles_manage_public_files(httpd_$1_script_t)
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	# Allow the web server to run scripts and serve pages
Chris PeBenito 9401ae1
	tunable_policy(`httpd_builtin_scripting',`
Chris PeBenito 9401ae1
		manage_dirs_pattern(httpd_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
Chris PeBenito 9401ae1
		manage_files_pattern(httpd_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
Chris PeBenito 9401ae1
		manage_lnk_files_pattern(httpd_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
Chris PeBenito 9401ae1
		rw_sock_files_pattern(httpd_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		allow httpd_t httpd_$1_ra_content_t:dir { list_dir_perms add_entry_dir_perms };
Chris PeBenito 9401ae1
		read_files_pattern(httpd_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
Chris PeBenito 9401ae1
		append_files_pattern(httpd_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
Chris PeBenito 9401ae1
		read_lnk_files_pattern(httpd_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		allow httpd_t httpd_$1_content_t:dir list_dir_perms;
Chris PeBenito 9401ae1
		read_files_pattern(httpd_t, httpd_$1_content_t, httpd_$1_content_t)
Chris PeBenito 9401ae1
		read_lnk_files_pattern(httpd_t, httpd_$1_content_t, httpd_$1_content_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		allow httpd_t httpd_$1_content_t:dir list_dir_perms;
Chris PeBenito 9401ae1
		read_files_pattern(httpd_t, httpd_$1_content_t, httpd_$1_content_t)
Chris PeBenito 9401ae1
		read_lnk_files_pattern(httpd_t, httpd_$1_content_t, httpd_$1_content_t)
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	tunable_policy(`httpd_enable_cgi',`
Chris PeBenito 9401ae1
		allow httpd_$1_script_t httpd_$1_script_exec_t:file entrypoint;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		# privileged users run the script:
Chris PeBenito 9401ae1
		domtrans_pattern(httpd_exec_scripts, httpd_$1_script_exec_t, httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		# apache runs the script:
Chris PeBenito 9401ae1
		domtrans_pattern(httpd_t, httpd_$1_script_exec_t, httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		allow httpd_t httpd_$1_script_t:process { signal sigkill sigstop };
Chris PeBenito 9401ae1
		allow httpd_t httpd_$1_script_exec_t:dir list_dir_perms;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		allow httpd_$1_script_t self:process { setsched signal_perms };
Chris PeBenito 9401ae1
		allow httpd_$1_script_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		allow httpd_$1_script_t httpd_t:fd use;
Chris PeBenito 9401ae1
		allow httpd_$1_script_t httpd_t:process sigchld;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		kernel_read_system_state(httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		dev_read_urand(httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		fs_getattr_xattr_fs(httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		files_read_etc_runtime_files(httpd_$1_script_t)
Chris PeBenito 9401ae1
		files_read_usr_files(httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		libs_read_lib_files(httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		miscfiles_read_localization(httpd_$1_script_t)
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	optional_policy(`
Chris PeBenito 9401ae1
		tunable_policy(`httpd_enable_cgi && allow_ypbind',`
Chris PeBenito 9401ae1
			nis_use_ypbind_uncond(httpd_$1_script_t)
Chris PeBenito 9401ae1
		')
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	optional_policy(`
Chris PeBenito 9401ae1
		postgresql_unpriv_client(httpd_$1_script_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		tunable_policy(`httpd_enable_cgi && httpd_can_network_connect_db',`
Chris PeBenito 9401ae1
			postgresql_tcp_connect(httpd_$1_script_t)
Chris PeBenito 9401ae1
		')
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	optional_policy(`
Chris PeBenito 9401ae1
		nscd_socket_use(httpd_$1_script_t)
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Role access for apache
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="role">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Role allowed access
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	User domain for the role
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_role',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		attribute httpdcontent;
Chris PeBenito 9401ae1
		type httpd_user_content_t, httpd_user_htaccess_t;
Chris PeBenito 9401ae1
		type httpd_user_script_t, httpd_user_script_exec_t;
Chris PeBenito 9401ae1
		type httpd_user_ra_content_t, httpd_user_rw_content_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	role $1 types httpd_user_script_t;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $2 httpd_user_htaccess_t:file { manage_file_perms relabelto relabelfrom };
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	manage_dirs_pattern($2, httpd_user_content_t, httpd_user_content_t)
Chris PeBenito 9401ae1
	manage_files_pattern($2, httpd_user_content_t, httpd_user_content_t)
Chris PeBenito 9401ae1
	manage_lnk_files_pattern($2, httpd_user_content_t, httpd_user_content_t)
Chris PeBenito 9401ae1
	relabel_dirs_pattern($2, httpd_user_content_t, httpd_user_content_t)
Chris PeBenito 9401ae1
	relabel_files_pattern($2, httpd_user_content_t, httpd_user_content_t)
Chris PeBenito 9401ae1
	relabel_lnk_files_pattern($2, httpd_user_content_t, httpd_user_content_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	manage_dirs_pattern($2, httpd_user_ra_content_t, httpd_user_ra_content_t)
Chris PeBenito 9401ae1
	manage_files_pattern($2, httpd_user_ra_content_t, httpd_user_ra_content_t)
Chris PeBenito 9401ae1
	manage_lnk_files_pattern($2, httpd_user_ra_content_t, httpd_user_ra_content_t)
Chris PeBenito 9401ae1
	relabel_dirs_pattern($2, httpd_user_ra_content_t, httpd_user_ra_content_t)
Chris PeBenito 9401ae1
	relabel_files_pattern($2, httpd_user_ra_content_t, httpd_user_ra_content_t)
Chris PeBenito 9401ae1
	relabel_lnk_files_pattern($2, httpd_user_ra_content_t, httpd_user_ra_content_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	manage_dirs_pattern($2, httpd_user_rw_content_t, httpd_user_rw_content_t)
Chris PeBenito 9401ae1
	manage_files_pattern($2, httpd_user_rw_content_t, httpd_user_rw_content_t)
Chris PeBenito 9401ae1
	manage_lnk_files_pattern($2, httpd_user_rw_content_t, httpd_user_rw_content_t)
Chris PeBenito 9401ae1
	relabel_dirs_pattern($2, httpd_user_rw_content_t, httpd_user_rw_content_t)
Chris PeBenito 9401ae1
	relabel_files_pattern($2, httpd_user_rw_content_t, httpd_user_rw_content_t)
Chris PeBenito 9401ae1
	relabel_lnk_files_pattern($2, httpd_user_rw_content_t, httpd_user_rw_content_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	manage_dirs_pattern($2, httpd_user_script_exec_t, httpd_user_script_exec_t)
Chris PeBenito 9401ae1
	manage_files_pattern($2, httpd_user_script_exec_t, httpd_user_script_exec_t)
Chris PeBenito 9401ae1
	manage_lnk_files_pattern($2, httpd_user_script_exec_t, httpd_user_script_exec_t)
Chris PeBenito 9401ae1
	relabel_dirs_pattern($2, httpd_user_script_exec_t, httpd_user_script_exec_t)
Chris PeBenito 9401ae1
	relabel_files_pattern($2, httpd_user_script_exec_t, httpd_user_script_exec_t)
Chris PeBenito 9401ae1
	relabel_lnk_files_pattern($2, httpd_user_script_exec_t, httpd_user_script_exec_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	tunable_policy(`httpd_enable_cgi',`
Chris PeBenito 9401ae1
		# If a user starts a script by hand it gets the proper context
Chris PeBenito 9401ae1
		domtrans_pattern($2, httpd_user_script_exec_t, httpd_user_script_t)
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	tunable_policy(`httpd_enable_cgi && httpd_unified',`
Chris PeBenito 9401ae1
		domtrans_pattern($2, httpdcontent, httpd_user_script_t)
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Read httpd user scripts executables.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_read_user_scripts',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_user_script_exec_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 httpd_user_script_exec_t:dir list_dir_perms;
Chris PeBenito 9401ae1
	read_files_pattern($1, httpd_user_script_exec_t, httpd_user_script_exec_t)
Chris PeBenito 9401ae1
	read_lnk_files_pattern($1, httpd_user_script_exec_t, httpd_user_script_exec_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Read user web content.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_read_user_content',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_user_content_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 httpd_user_content_t:dir list_dir_perms;
Chris PeBenito 9401ae1
	read_files_pattern($1, httpd_user_content_t, httpd_user_content_t)
Chris PeBenito 9401ae1
	read_lnk_files_pattern($1, httpd_user_content_t, httpd_user_content_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Transition to apache.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed to transition.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_domtrans',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_t, httpd_exec_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	corecmd_search_bin($1)
Chris PeBenito 9401ae1
	domtrans_pattern($1, httpd_exec_t, httpd_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
#######################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Send a generic signal to apache.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_signal',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 httpd_t:process signal;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Send a null signal to apache.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_signull',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 httpd_t:process signull;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Send a SIGCHLD signal to apache.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_sigchld',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 httpd_t:process sigchld;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Inherit and use file descriptors from Apache.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_use_fds',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 httpd_t:fd use;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Do not audit attempts to read and write Apache
Chris PeBenito 9401ae1
##	unnamed pipes.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain to not audit.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_dontaudit_rw_fifo_file',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	dontaudit $1 httpd_t:fifo_file rw_fifo_file_perms;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Do not audit attempts to read and write Apache
Chris PeBenito 9401ae1
##	unix domain stream sockets.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain to not audit.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_dontaudit_rw_stream_sockets',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	dontaudit $1 httpd_t:unix_stream_socket { read write };
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Do not audit attempts to read and write Apache
Chris PeBenito 9401ae1
##	TCP sockets.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain to not audit.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_dontaudit_rw_tcp_sockets',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	dontaudit $1 httpd_t:tcp_socket { read write };
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Create, read, write, and delete all web content.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <rolecap/>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_manage_all_content',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		attribute httpdcontent, httpd_script_exec_type;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	manage_dirs_pattern($1, httpdcontent, httpdcontent)
Chris PeBenito 9401ae1
	manage_files_pattern($1, httpdcontent, httpdcontent)
Chris PeBenito 9401ae1
	manage_lnk_files_pattern($1, httpdcontent, httpdcontent)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	manage_dirs_pattern($1, httpd_script_exec_type, httpd_script_exec_type)
Chris PeBenito 9401ae1
	manage_files_pattern($1, httpd_script_exec_type, httpd_script_exec_type)
Chris PeBenito 9401ae1
	manage_lnk_files_pattern($1, httpd_script_exec_type, httpd_script_exec_type)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Allow domain to  set the attributes
Chris PeBenito 9401ae1
##	of the APACHE cache directory.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_setattr_cache_dirs',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_cache_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 httpd_cache_t:dir setattr;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Allow the specified domain to list
Chris PeBenito 9401ae1
##	Apache cache.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_list_cache',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_cache_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	list_dirs_pattern($1, httpd_cache_t, httpd_cache_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Allow the specified domain to read
Chris PeBenito 9401ae1
##	and write Apache cache files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_rw_cache_files',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_cache_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 httpd_cache_t:file rw_file_perms;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Allow the specified domain to delete
Chris PeBenito 9401ae1
##	Apache cache.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_delete_cache_files',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_cache_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	delete_files_pattern($1, httpd_cache_t, httpd_cache_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Allow the specified domain to read
Chris PeBenito 9401ae1
##	apache configuration files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <rolecap/>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_read_config',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_config_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	files_search_etc($1)
Chris PeBenito 9401ae1
	allow $1 httpd_config_t:dir list_dir_perms;
Chris PeBenito 9401ae1
	read_files_pattern($1, httpd_config_t, httpd_config_t)
Chris PeBenito 9401ae1
	read_lnk_files_pattern($1, httpd_config_t, httpd_config_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Allow the specified domain to manage
Chris PeBenito 9401ae1
##	apache configuration files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_manage_config',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_config_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	files_search_etc($1)
Chris PeBenito 9401ae1
	manage_dirs_pattern($1, httpd_config_t, httpd_config_t)
Chris PeBenito 9401ae1
	manage_files_pattern($1, httpd_config_t, httpd_config_t)
Chris PeBenito 9401ae1
	read_lnk_files_pattern($1, httpd_config_t, httpd_config_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Execute the Apache helper program with
Chris PeBenito 9401ae1
##	a domain transition.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_domtrans_helper',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_helper_t, httpd_helper_exec_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	corecmd_search_bin($1)
Chris PeBenito 9401ae1
	domtrans_pattern($1, httpd_helper_exec_t, httpd_helper_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Execute the Apache helper program with
Chris PeBenito 9401ae1
##	a domain transition, and allow the
Chris PeBenito 9401ae1
##	specified role the Apache helper domain.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed to transition.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <param name="role">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Role allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <rolecap/>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_run_helper',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_helper_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	apache_domtrans_helper($1)
Chris PeBenito 9401ae1
	role $2 types httpd_helper_t;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Allow the specified domain to read
Chris PeBenito 9401ae1
##	apache log files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <rolecap/>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_read_log',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_log_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	logging_search_logs($1)
Chris PeBenito 9401ae1
	allow $1 httpd_log_t:dir list_dir_perms;
Chris PeBenito 9401ae1
	read_files_pattern($1, httpd_log_t, httpd_log_t)
Chris PeBenito 9401ae1
	read_lnk_files_pattern($1, httpd_log_t, httpd_log_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Allow the specified domain to append
Chris PeBenito 9401ae1
##	to apache log files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_append_log',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_log_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	logging_search_logs($1)
Chris PeBenito 9401ae1
	allow $1 httpd_log_t:dir list_dir_perms;
Chris PeBenito 9401ae1
	append_files_pattern($1, httpd_log_t, httpd_log_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Do not audit attempts to append to the
Chris PeBenito 9401ae1
##	Apache logs.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain to not audit.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_dontaudit_append_log',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_log_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	dontaudit $1 httpd_log_t:file { getattr append };
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Allow the specified domain to manage
Chris PeBenito 9401ae1
##	to apache log files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_manage_log',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_log_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	logging_search_logs($1)
Chris PeBenito 9401ae1
	manage_dirs_pattern($1, httpd_log_t, httpd_log_t)
Chris PeBenito 9401ae1
	manage_files_pattern($1, httpd_log_t, httpd_log_t)
Chris PeBenito 9401ae1
	read_lnk_files_pattern($1, httpd_log_t, httpd_log_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Do not audit attempts to search Apache
Chris PeBenito 9401ae1
##	module directories.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain to not audit.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_dontaudit_search_modules',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_modules_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	dontaudit $1 httpd_modules_t:dir search_dir_perms;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Allow the specified domain to list
Chris PeBenito 9401ae1
##	the contents of the apache modules
Chris PeBenito 9401ae1
##	directory.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_list_modules',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_modules_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 httpd_modules_t:dir list_dir_perms;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Allow the specified domain to execute
Chris PeBenito 9401ae1
##	apache modules.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_exec_modules',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_modules_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 httpd_modules_t:dir list_dir_perms;
Chris PeBenito 9401ae1
	allow $1 httpd_modules_t:lnk_file read_lnk_file_perms;
Chris PeBenito 9401ae1
	can_exec($1, httpd_modules_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Execute a domain transition to run httpd_rotatelogs.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed to transition.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_domtrans_rotatelogs',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_rotatelogs_t, httpd_rotatelogs_exec_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	domtrans_pattern($1, httpd_rotatelogs_exec_t, httpd_rotatelogs_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Allow the specified domain to list
Chris PeBenito 9401ae1
##	apache system content files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_list_sys_content',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_sys_content_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	list_dirs_pattern($1, httpd_sys_content_t, httpd_sys_content_t)
Chris PeBenito 9401ae1
	files_search_var($1)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Allow the specified domain to manage
Chris PeBenito 9401ae1
##	apache system content files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <rolecap/>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
# Note that httpd_sys_content_t is found in /var, /etc, /srv and /usr
Chris PeBenito 9401ae1
interface(`apache_manage_sys_content',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_sys_content_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	files_search_var($1)
Chris PeBenito 9401ae1
	manage_dirs_pattern($1, httpd_sys_content_t, httpd_sys_content_t)
Chris PeBenito 9401ae1
	manage_files_pattern($1, httpd_sys_content_t, httpd_sys_content_t)
Chris PeBenito 9401ae1
	manage_lnk_files_pattern($1, httpd_sys_content_t, httpd_sys_content_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Execute all web scripts in the system
Chris PeBenito 9401ae1
##	script domain.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed to transition.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
# cjp: this interface specifically added to allow
Chris PeBenito 9401ae1
# sysadm_t to run scripts
Chris PeBenito 9401ae1
interface(`apache_domtrans_sys_script',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		attribute httpdcontent;
Chris PeBenito 9401ae1
		type httpd_sys_script_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	tunable_policy(`httpd_enable_cgi && httpd_unified',`
Chris PeBenito 9401ae1
		domtrans_pattern($1, httpdcontent, httpd_sys_script_t)
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Do not audit attempts to read and write Apache
Chris PeBenito 9401ae1
##	system script unix domain stream sockets.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain to not audit.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_dontaudit_rw_sys_script_stream_sockets',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_sys_script_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	dontaudit $1 httpd_sys_script_t:unix_stream_socket { read write };
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Execute all user scripts in the user
Chris PeBenito 9401ae1
##	script domain.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed to transition.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_domtrans_all_scripts',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		attribute httpd_exec_scripts;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	typeattribute $1 httpd_exec_scripts;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Execute all user scripts in the user
Chris PeBenito 9401ae1
##	script domain.  Add user script domains
Chris PeBenito 9401ae1
##	to the specified role.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed to transition.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <param name="role">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Role allowed access..
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_run_all_scripts',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		attribute httpd_exec_scripts, httpd_script_domains;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	role $2 types httpd_script_domains;
Chris PeBenito 9401ae1
	apache_domtrans_all_scripts($1)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Allow the specified domain to read
Chris PeBenito 9401ae1
##	apache squirrelmail data.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_read_squirrelmail_data',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_squirrelmail_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 httpd_squirrelmail_t:file read_file_perms;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Allow the specified domain to append
Chris PeBenito 9401ae1
##	apache squirrelmail data.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_append_squirrelmail_data',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_squirrelmail_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 httpd_squirrelmail_t:file append_file_perms;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Search apache system content.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_search_sys_content',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_sys_content_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 httpd_sys_content_t:dir search_dir_perms;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Read apache system content.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_read_sys_content',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_sys_content_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 httpd_sys_content_t:dir list_dir_perms;
Chris PeBenito 9401ae1
	read_files_pattern($1, httpd_sys_content_t, httpd_sys_content_t)
Chris PeBenito 9401ae1
	read_lnk_files_pattern($1, httpd_sys_content_t, httpd_sys_content_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Search apache system CGI directories.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_search_sys_scripts',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_sys_content_t, httpd_sys_script_exec_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	search_dirs_pattern($1, httpd_sys_content_t, httpd_sys_script_exec_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Create, read, write, and delete all user web content.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <rolecap/>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_manage_all_user_content',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		attribute httpd_user_content_type, httpd_user_script_exec_type;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	manage_dirs_pattern($1, httpd_user_content_type, httpd_user_content_type)
Chris PeBenito 9401ae1
	manage_files_pattern($1, httpd_user_content_type, httpd_user_content_type)
Chris PeBenito 9401ae1
	manage_lnk_files_pattern($1, httpd_user_content_type, httpd_user_content_type)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	manage_dirs_pattern($1, httpd_user_script_exec_type, httpd_user_script_exec_type)
Chris PeBenito 9401ae1
	manage_files_pattern($1, httpd_user_script_exec_type, httpd_user_script_exec_type)
Chris PeBenito 9401ae1
	manage_lnk_files_pattern($1, httpd_user_script_exec_type, httpd_user_script_exec_type)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Search system script state directory.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_search_sys_script_state',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_sys_script_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 httpd_sys_script_t:dir search_dir_perms;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Allow the specified domain to read
Chris PeBenito 9401ae1
##	apache tmp files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_read_tmp_files',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_tmp_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	files_search_tmp($1)
Chris PeBenito 9401ae1
	read_files_pattern($1, httpd_tmp_t, httpd_tmp_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Dontaudit attempts to write
Chris PeBenito 9401ae1
##	apache tmp files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain to not audit.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_dontaudit_write_tmp_files',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_tmp_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	dontaudit $1 httpd_tmp_t:file write_file_perms;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Execute CGI in the specified domain.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
##	<desc>
Chris PeBenito 9401ae1
##	

Chris PeBenito 9401ae1
##	Execute CGI in the specified domain.
Chris PeBenito 9401ae1
##	

Chris PeBenito 9401ae1
##	

Chris PeBenito 9401ae1
##	This is an interface to support third party modules
Chris PeBenito 9401ae1
##	and its use is not allowed in upstream reference
Chris PeBenito 9401ae1
##	policy.
Chris PeBenito 9401ae1
##	

Chris PeBenito 9401ae1
##	</desc>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain run the cgi script in.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <param name="entrypoint">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Type of the executable to enter the cgi domain.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_cgi_domain',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type httpd_t, httpd_sys_script_exec_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	domtrans_pattern(httpd_t, $2, $1)
Chris PeBenito 9401ae1
	apache_search_sys_scripts($1)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow httpd_t $1:process signal;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	All of the rules required to administrate an apache environment
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="prefix">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Prefix of the domain. Example, user would be
Chris PeBenito 9401ae1
##	the prefix for the uder_t domain.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <param name="role">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Role allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <rolecap/>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`apache_admin',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		attribute httpdcontent;
Chris PeBenito 9401ae1
		attribute httpd_script_exec_type;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
		type httpd_t, httpd_config_t, httpd_log_t;
Chris PeBenito 9401ae1
		type httpd_modules_t, httpd_lock_t;
Chris PeBenito 9401ae1
		type httpd_var_run_t, httpd_php_tmp_t;
Chris PeBenito 9401ae1
		type httpd_suexec_tmp_t, httpd_tmp_t;
Chris PeBenito 9401ae1
		type httpd_initrc_exec_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 httpd_t:process { getattr ptrace signal_perms };
Chris PeBenito 9401ae1
	ps_process_pattern($1, httpd_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	init_labeled_script_domtrans($1, httpd_initrc_exec_t)
Chris PeBenito 9401ae1
	domain_system_change_exemption($1)
Chris PeBenito 9401ae1
	role_transition $2 httpd_initrc_exec_t system_r;
Chris PeBenito 9401ae1
	allow $2 system_r;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	apache_manage_all_content($1)
Chris PeBenito 9401ae1
	miscfiles_manage_public_files($1)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	files_search_etc($1)
Chris PeBenito 9401ae1
	admin_pattern($1, httpd_config_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	logging_search_logs($1)
Chris PeBenito 9401ae1
	admin_pattern($1, httpd_log_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	admin_pattern($1, httpd_modules_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	admin_pattern($1, httpd_lock_t)
Chris PeBenito 9401ae1
	files_lock_filetrans($1, httpd_lock_t, file)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	admin_pattern($1, httpd_var_run_t)
Chris PeBenito 9401ae1
	files_pid_filetrans($1, httpd_var_run_t, file)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	kernel_search_proc($1)
Chris PeBenito 9401ae1
	allow $1 httpd_t:dir list_dir_perms;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	read_lnk_files_pattern($1, httpd_t, httpd_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	admin_pattern($1, httpdcontent)
Chris PeBenito 9401ae1
	admin_pattern($1, httpd_script_exec_type)
Chris PeBenito 9401ae1
	admin_pattern($1, httpd_tmp_t)
Chris PeBenito 9401ae1
	admin_pattern($1, httpd_php_tmp_t)
Chris PeBenito 9401ae1
	admin_pattern($1, httpd_suexec_tmp_t)
Chris PeBenito 9401ae1
')