4fc70e2
diff --git a/apache.if b/apache.if
4fc70e2
index fac6fe5..804867a 100644
4fc70e2
--- a/apache.if
4fc70e2
+++ b/apache.if
4fc70e2
@@ -14,99 +14,123 @@
4fc70e2
 template(`apache_content_template',`
4fc70e2
 	gen_require(`
4fc70e2
 		attribute httpd_exec_scripts, httpd_script_exec_type;
4fc70e2
-		type httpd_t, httpd_suexec_t, httpd_log_t;
4fc70e2
-		type httpd_sys_content_t;
4fc70e2
+		type httpd_t, httpd_suexec_t;
4fc70e2
 		attribute httpd_script_type, httpd_content_type;
4fc70e2
 	')
4fc70e2
 
4fc70e2
 	#This type is for webpages
4fc70e2
-	type httpd_$1_content_t; # customizable;
4fc70e2
-	typeattribute httpd_$1_content_t httpd_content_type;
4fc70e2
-	typealias httpd_$1_content_t alias httpd_$1_script_ro_t;
4fc70e2
-	files_type(httpd_$1_content_t)
4fc70e2
+	type $1_content_t; # customizable;
4fc70e2
+	typeattribute $1_content_t httpd_content_type;
4fc70e2
+	typealias $1_content_t alias httpd_$1_script_ro_t;
4fc70e2
+	files_type($1_content_t)
4fc70e2
 
4fc70e2
 	# This type is used for .htaccess files
4fc70e2
-	type httpd_$1_htaccess_t, httpd_content_type; # customizable;
4fc70e2
-	typeattribute httpd_$1_htaccess_t httpd_content_type;
4fc70e2
-	files_type(httpd_$1_htaccess_t)
4fc70e2
+	type $1_htaccess_t, httpd_content_type; # customizable;
4fc70e2
+	typeattribute $1_htaccess_t httpd_content_type;
4fc70e2
+	files_type($1_htaccess_t)
4fc70e2
 
4fc70e2
 	# Type that CGI scripts run as
4fc70e2
-	type httpd_$1_script_t,	httpd_script_type;
4fc70e2
-	domain_type(httpd_$1_script_t)
4fc70e2
-	role system_r types httpd_$1_script_t;
4fc70e2
+	type $1_script_t,	httpd_script_type;
4fc70e2
+	domain_type($1_script_t)
4fc70e2
+	role system_r types $1_script_t;
4fc70e2
 
4fc70e2
-	kernel_read_system_state(httpd_$1_script_t)
4fc70e2
+	kernel_read_system_state($1_script_t)
4fc70e2
 
4fc70e2
 	# This type is used for executable scripts files
4fc70e2
-	type httpd_$1_script_exec_t, httpd_script_exec_type; # customizable;
4fc70e2
-	typeattribute httpd_$1_script_exec_t httpd_content_type;
4fc70e2
-	domain_entry_file(httpd_$1_script_t, httpd_$1_script_exec_t)
4fc70e2
+	type $1_script_exec_t, httpd_script_exec_type; # customizable;
4fc70e2
+	typeattribute $1_script_exec_t httpd_content_type;
4fc70e2
+	domain_entry_file($1_script_t, $1_script_exec_t)
4fc70e2
 
4fc70e2
-	type httpd_$1_rw_content_t; # customizable
4fc70e2
-	typeattribute httpd_$1_rw_content_t httpd_content_type;
4fc70e2
-	typealias httpd_$1_rw_content_t alias { httpd_$1_script_rw_t httpd_$1_content_rw_t };
4fc70e2
-	files_type(httpd_$1_rw_content_t)
4fc70e2
+	type $1_rw_content_t; # customizable
4fc70e2
+	typeattribute $1_rw_content_t httpd_content_type;
4fc70e2
+	typealias $1_rw_content_t alias { $1_script_rw_t };
4fc70e2
+	files_type($1_rw_content_t)
4fc70e2
 
4fc70e2
-	type httpd_$1_ra_content_t, httpd_content_type; # customizable
4fc70e2
-	typeattribute httpd_$1_ra_content_t httpd_content_type;
4fc70e2
-	typealias httpd_$1_ra_content_t alias { httpd_$1_script_ra_t httpd_$1_content_ra_t };
4fc70e2
-	files_type(httpd_$1_ra_content_t)
4fc70e2
+	type $1_ra_content_t, httpd_content_type; # customizable
4fc70e2
+	typeattribute $1_ra_content_t httpd_content_type;
4fc70e2
+	typealias $1_ra_content_t alias { $1_script_ra_t $1_content_ra_t };
4fc70e2
+	files_type($1_ra_content_t)
4fc70e2
 
4fc70e2
 	# Allow the script process to search the cgi directory, and users directory
4fc70e2
-	allow httpd_$1_script_t httpd_$1_content_t:dir search_dir_perms;
4fc70e2
+	allow $1_script_t $1_content_t:dir search_dir_perms;
4fc70e2
 
4fc70e2
-	can_exec(httpd_$1_script_t, httpd_$1_script_exec_t)
4fc70e2
-	allow httpd_$1_script_t httpd_$1_script_exec_t:dir list_dir_perms;
4fc70e2
+	can_exec($1_script_t, $1_script_exec_t)
4fc70e2
+	allow $1_script_t $1_script_exec_t:dir list_dir_perms;
4fc70e2
 
4fc70e2
-	allow httpd_$1_script_t httpd_$1_ra_content_t:dir { list_dir_perms add_entry_dir_perms };
4fc70e2
-	read_files_pattern(httpd_$1_script_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
4fc70e2
-	append_files_pattern(httpd_$1_script_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
4fc70e2
-	create_files_pattern(httpd_$1_script_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
4fc70e2
-	read_lnk_files_pattern(httpd_$1_script_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
4fc70e2
+	allow $1_script_t $1_ra_content_t:dir { list_dir_perms add_entry_dir_perms };
4fc70e2
+	read_files_pattern($1_script_t, $1_ra_content_t, $1_ra_content_t)
4fc70e2
+	append_files_pattern($1_script_t, $1_ra_content_t, $1_ra_content_t)
4fc70e2
+	create_files_pattern($1_script_t, $1_ra_content_t, $1_ra_content_t)
4fc70e2
+	read_lnk_files_pattern($1_script_t, $1_ra_content_t, $1_ra_content_t)
4fc70e2
 
4fc70e2
-	allow httpd_$1_script_t httpd_$1_content_t:dir list_dir_perms;
4fc70e2
-	read_files_pattern(httpd_$1_script_t, httpd_$1_content_t, httpd_$1_content_t)
4fc70e2
-	read_lnk_files_pattern(httpd_$1_script_t, httpd_$1_content_t, httpd_$1_content_t)
4fc70e2
+	allow $1_script_t $1_content_t:dir list_dir_perms;
4fc70e2
+	read_files_pattern($1_script_t, $1_content_t, $1_content_t)
4fc70e2
+	read_lnk_files_pattern($1_script_t, $1_content_t, $1_content_t)
4fc70e2
 
4fc70e2
-	manage_dirs_pattern(httpd_$1_script_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
4fc70e2
-	manage_files_pattern(httpd_$1_script_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
4fc70e2
-	manage_lnk_files_pattern(httpd_$1_script_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
4fc70e2
-	manage_fifo_files_pattern(httpd_$1_script_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
4fc70e2
-	manage_sock_files_pattern(httpd_$1_script_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
4fc70e2
+	manage_dirs_pattern($1_script_t, $1_rw_content_t, $1_rw_content_t)
4fc70e2
+	manage_files_pattern($1_script_t, $1_rw_content_t, $1_rw_content_t)
4fc70e2
+	manage_lnk_files_pattern($1_script_t, $1_rw_content_t, $1_rw_content_t)
4fc70e2
+	manage_fifo_files_pattern($1_script_t, $1_rw_content_t, $1_rw_content_t)
4fc70e2
+	manage_sock_files_pattern($1_script_t, $1_rw_content_t, $1_rw_content_t)
4fc70e2
 
4fc70e2
 	# Allow the web server to run scripts and serve pages
4fc70e2
 	tunable_policy(`httpd_builtin_scripting',`
4fc70e2
-		manage_dirs_pattern(httpd_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
4fc70e2
-		manage_files_pattern(httpd_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
4fc70e2
-		manage_lnk_files_pattern(httpd_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
4fc70e2
-		rw_sock_files_pattern(httpd_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
4fc70e2
+		manage_dirs_pattern(httpd_t, $1_rw_content_t, $1_rw_content_t)
4fc70e2
+		manage_files_pattern(httpd_t, $1_rw_content_t, $1_rw_content_t)
4fc70e2
+		manage_lnk_files_pattern(httpd_t, $1_rw_content_t, $1_rw_content_t)
4fc70e2
+		rw_sock_files_pattern(httpd_t, $1_rw_content_t, $1_rw_content_t)
4fc70e2
 
4fc70e2
-		allow httpd_t httpd_$1_ra_content_t:dir { add_entry_dir_perms };
4fc70e2
-		read_files_pattern(httpd_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
4fc70e2
-		append_files_pattern(httpd_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
4fc70e2
-		create_files_pattern(httpd_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
4fc70e2
-		read_lnk_files_pattern(httpd_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
4fc70e2
+		allow httpd_t $1_ra_content_t:dir { add_entry_dir_perms };
4fc70e2
+		read_files_pattern(httpd_t, $1_ra_content_t, $1_ra_content_t)
4fc70e2
+		append_files_pattern(httpd_t, $1_ra_content_t, $1_ra_content_t)
4fc70e2
+		create_files_pattern(httpd_t, $1_ra_content_t, $1_ra_content_t)
4fc70e2
+		read_lnk_files_pattern(httpd_t, $1_ra_content_t, $1_ra_content_t)
4fc70e2
 
4fc70e2
 	')
4fc70e2
 
4fc70e2
 	tunable_policy(`httpd_enable_cgi',`
4fc70e2
-		allow httpd_$1_script_t httpd_$1_script_exec_t:file entrypoint;
4fc70e2
+		allow $1_script_t $1_script_exec_t:file entrypoint;
4fc70e2
 
4fc70e2
-		domtrans_pattern(httpd_suexec_t, httpd_$1_script_exec_t, httpd_$1_script_t)
4fc70e2
+		domtrans_pattern(httpd_suexec_t, $1_script_exec_t, $1_script_t)
4fc70e2
 
4fc70e2
 		# privileged users run the script:
4fc70e2
-		domtrans_pattern(httpd_exec_scripts, httpd_$1_script_exec_t, httpd_$1_script_t)
4fc70e2
+		domtrans_pattern(httpd_exec_scripts, $1_script_exec_t, $1_script_t)
4fc70e2
 
4fc70e2
-		allow httpd_exec_scripts httpd_$1_script_exec_t:file read_file_perms;
4fc70e2
+		allow httpd_exec_scripts $1_script_exec_t:file read_file_perms;
4fc70e2
 
4fc70e2
 		# apache runs the script:
4fc70e2
-		domtrans_pattern(httpd_t, httpd_$1_script_exec_t, httpd_$1_script_t)
4fc70e2
-		allow httpd_t httpd_$1_script_t:unix_dgram_socket sendto;
4fc70e2
+		domtrans_pattern(httpd_t, $1_script_exec_t, $1_script_t)
4fc70e2
+		allow httpd_t $1_script_t:unix_dgram_socket sendto;
4fc70e2
 	')
4fc70e2
 ')
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
 ## <summary>
4fc70e2
+##	Create a set of derived types for apache
4fc70e2
+##	web content.
4fc70e2
+## </summary>
4fc70e2
+## <param name="prefix">
4fc70e2
+##	<summary>
4fc70e2
+##	The prefix to be used for deriving new type names.
4fc70e2
+##	</summary>
4fc70e2
+## </param>
4fc70e2
+## <param name="oldprefix">
4fc70e2
+##	<summary>
4fc70e2
+##	The prefix to be used for deriving old type names.
4fc70e2
+##	</summary>
4fc70e2
+## </param>
4fc70e2
+#
4fc70e2
+template(`apache_content_alias_template',`
4fc70e2
+	typealias $1_htaccess_t alias httpd_$2_htaccess_t;
4fc70e2
+	typealias $1_script_t alias httpd_$2_script_t;
4fc70e2
+	typealias $1_script_exec_t alias httpd_$2_script_exec_t;
4fc70e2
+	typealias $1_content_t alias httpd_$2_content_t;
4fc70e2
+	typealias $1_rw_content_t alias httpd_$2_script_rw_content_t;
4fc70e2
+	typealias $1_ra_content_t alias httpd_$2_script_ra_content_t;
4fc70e2
+')
4fc70e2
+
4fc70e2
+########################################
4fc70e2
+## <summary>
4fc70e2
 ##	Role access for apache
4fc70e2
 ## </summary>
4fc70e2
 ## <param name="role">
4fc70e2
diff --git a/apache.te b/apache.te
4fc70e2
index 0e09bca..85e992e 100644
4fc70e2
--- a/apache.te
4fc70e2
+++ b/apache.te
4fc70e2
@@ -370,7 +370,7 @@ type httpd_suexec_tmp_t;
4fc70e2
 files_tmp_file(httpd_suexec_tmp_t)
4fc70e2
 
4fc70e2
 # setup the system domain for system CGI scripts
4fc70e2
-apache_content_template(sys)
4fc70e2
+apache_content_template(httpd_sys)
4fc70e2
 
4fc70e2
 typeattribute httpd_sys_content_t httpdcontent; # customizable
4fc70e2
 typeattribute httpd_sys_rw_content_t httpdcontent; # customizable
4fc70e2
@@ -389,7 +389,7 @@ files_tmp_file(httpd_tmp_t)
4fc70e2
 type httpd_tmpfs_t;
4fc70e2
 files_tmpfs_file(httpd_tmpfs_t)
4fc70e2
 
4fc70e2
-apache_content_template(user)
4fc70e2
+apache_content_template(httpd_user)
4fc70e2
 ubac_constrained(httpd_user_script_t)
4fc70e2
 
4fc70e2
 typeattribute httpd_user_content_t httpdcontent;
4fc70e2
@@ -1619,6 +1619,7 @@ allow httpd_t httpd_script_exec_type:dir list_dir_perms;
4fc70e2
 allow httpd_script_type self:process { setsched signal_perms };
4fc70e2
 allow httpd_script_type self:unix_stream_socket create_stream_socket_perms;
4fc70e2
 allow httpd_script_type self:unix_dgram_socket create_socket_perms;
4fc70e2
+allow httpd_script_type httpd_t:unix_stream_socket rw_stream_socket_perms;
4fc70e2
 
4fc70e2
 allow httpd_script_type httpd_t:fd use;
4fc70e2
 allow httpd_script_type httpd_t:process sigchld;
4fc70e2
diff --git a/apcupsd.fc b/apcupsd.fc
4fc70e2
index 1c37fe1..274704f 100644
4fc70e2
--- a/apcupsd.fc
4fc70e2
+++ b/apcupsd.fc
4fc70e2
@@ -14,8 +14,8 @@
4fc70e2
 
4fc70e2
 /var/run/apcupsd\.pid	--	gen_context(system_u:object_r:apcupsd_var_run_t,s0)
4fc70e2
 
4fc70e2
-/var/www/apcupsd/multimon\.cgi	--	gen_context(system_u:object_r:httpd_apcupsd_cgi_script_exec_t,s0)
4fc70e2
-/var/www/apcupsd/upsfstats\.cgi	--	gen_context(system_u:object_r:httpd_apcupsd_cgi_script_exec_t,s0)
4fc70e2
-/var/www/apcupsd/upsimage\.cgi	--	gen_context(system_u:object_r:httpd_apcupsd_cgi_script_exec_t,s0)
4fc70e2
-/var/www/apcupsd/upsstats\.cgi	--	gen_context(system_u:object_r:httpd_apcupsd_cgi_script_exec_t,s0)
4fc70e2
-/var/www/cgi-bin/apcgui(/.*)?	gen_context(system_u:object_r:httpd_apcupsd_cgi_script_exec_t,s0)
4fc70e2
+/var/www/apcupsd/multimon\.cgi	--	gen_context(system_u:object_r:apcupsd_cgi_script_exec_t,s0)
4fc70e2
+/var/www/apcupsd/upsfstats\.cgi	--	gen_context(system_u:object_r:apcupsd_cgi_script_exec_t,s0)
4fc70e2
+/var/www/apcupsd/upsimage\.cgi	--	gen_context(system_u:object_r:apcupsd_cgi_script_exec_t,s0)
4fc70e2
+/var/www/apcupsd/upsstats\.cgi	--	gen_context(system_u:object_r:apcupsd_cgi_script_exec_t,s0)
4fc70e2
+/var/www/cgi-bin/apcgui(/.*)?	gen_context(system_u:object_r:apcupsd_cgi_script_exec_t,s0)
4fc70e2
diff --git a/apcupsd.if b/apcupsd.if
4fc70e2
index b6afc90..9c06313 100644
4fc70e2
--- a/apcupsd.if
4fc70e2
+++ b/apcupsd.if
4fc70e2
@@ -102,7 +102,7 @@ interface(`apcupsd_append_log',`
4fc70e2
 ########################################
4fc70e2
 ## <summary>
4fc70e2
 ##	Execute a domain transition to
4fc70e2
-##	run httpd_apcupsd_cgi_script.
4fc70e2
+##	run apcupsd_cgi_script.
4fc70e2
 ## </summary>
4fc70e2
 ## <param name="domain">
4fc70e2
 ## <summary>
4fc70e2
@@ -112,11 +112,11 @@ interface(`apcupsd_append_log',`
4fc70e2
 #
4fc70e2
 interface(`apcupsd_cgi_script_domtrans',`
4fc70e2
 	gen_require(`
4fc70e2
-		type httpd_apcupsd_cgi_script_t, httpd_apcupsd_cgi_script_exec_t;
4fc70e2
+		type apcupsd_cgi_script_t, apcupsd_cgi_script_exec_t;
4fc70e2
 	')
4fc70e2
 
4fc70e2
 	files_search_var($1)
4fc70e2
-	domtrans_pattern($1, httpd_apcupsd_cgi_script_exec_t, httpd_apcupsd_cgi_script_t)
4fc70e2
+	domtrans_pattern($1, apcupsd_cgi_script_exec_t, apcupsd_cgi_script_t)
4fc70e2
 
4fc70e2
 	optional_policy(`
4fc70e2
 		apache_search_sys_content($1)
4fc70e2
diff --git a/apcupsd.te b/apcupsd.te
4fc70e2
index b4c43c7..11c215a 100644
4fc70e2
--- a/apcupsd.te
4fc70e2
+++ b/apcupsd.te
4fc70e2
@@ -116,19 +116,20 @@ optional_policy(`
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
 	apache_content_template(apcupsd_cgi)
4fc70e2
-
4fc70e2
-	allow httpd_apcupsd_cgi_script_t self:tcp_socket create_stream_socket_perms;
4fc70e2
-	allow httpd_apcupsd_cgi_script_t self:udp_socket create_socket_perms;
4fc70e2
-
4fc70e2
-	corenet_all_recvfrom_netlabel(httpd_apcupsd_cgi_script_t)
4fc70e2
-	corenet_tcp_sendrecv_generic_if(httpd_apcupsd_cgi_script_t)
4fc70e2
-	corenet_tcp_sendrecv_generic_node(httpd_apcupsd_cgi_script_t)
4fc70e2
-	corenet_tcp_sendrecv_all_ports(httpd_apcupsd_cgi_script_t)
4fc70e2
-	corenet_sendrecv_apcupsd_client_packets(httpd_apcupsd_cgi_script_t)
4fc70e2
-	corenet_tcp_connect_apcupsd_port(httpd_apcupsd_cgi_script_t)
4fc70e2
-	corenet_udp_sendrecv_generic_if(httpd_apcupsd_cgi_script_t)
4fc70e2
-	corenet_udp_sendrecv_generic_node(httpd_apcupsd_cgi_script_t)
4fc70e2
-	corenet_udp_sendrecv_all_ports(httpd_apcupsd_cgi_script_t)
4fc70e2
-
4fc70e2
-	sysnet_dns_name_resolve(httpd_apcupsd_cgi_script_t)
4fc70e2
+	apache_content_alias_template(apcupsd_cgi, apcupsd_cgi)
4fc70e2
+
4fc70e2
+	allow apcupsd_cgi_script_t self:tcp_socket create_stream_socket_perms;
4fc70e2
+	allow apcupsd_cgi_script_t self:udp_socket create_socket_perms;
4fc70e2
+
4fc70e2
+	corenet_all_recvfrom_netlabel(apcupsd_cgi_script_t)
4fc70e2
+	corenet_tcp_sendrecv_generic_if(apcupsd_cgi_script_t)
4fc70e2
+	corenet_tcp_sendrecv_generic_node(apcupsd_cgi_script_t)
4fc70e2
+	corenet_tcp_sendrecv_all_ports(apcupsd_cgi_script_t)
4fc70e2
+	corenet_sendrecv_apcupsd_client_packets(apcupsd_cgi_script_t)
4fc70e2
+	corenet_tcp_connect_apcupsd_port(apcupsd_cgi_script_t)
4fc70e2
+	corenet_udp_sendrecv_generic_if(apcupsd_cgi_script_t)
4fc70e2
+	corenet_udp_sendrecv_generic_node(apcupsd_cgi_script_t)
4fc70e2
+	corenet_udp_sendrecv_all_ports(apcupsd_cgi_script_t)
4fc70e2
+
4fc70e2
+	sysnet_dns_name_resolve(apcupsd_cgi_script_t)
4fc70e2
 ')
4fc70e2
diff --git a/awstats.fc b/awstats.fc
4fc70e2
index 11e6d5f..73b4ea4 100644
4fc70e2
--- a/awstats.fc
4fc70e2
+++ b/awstats.fc
4fc70e2
@@ -1,5 +1,5 @@
4fc70e2
 /usr/share/awstats/tools/.+\.pl	--	gen_context(system_u:object_r:awstats_exec_t,s0)
4fc70e2
-/usr/share/awstats/wwwroot(/.*)?	gen_context(system_u:object_r:httpd_awstats_content_t,s0)
4fc70e2
-/usr/share/awstats/wwwroot/cgi-bin(/.*)?	gen_context(system_u:object_r:httpd_awstats_script_exec_t,s0)
4fc70e2
+/usr/share/awstats/wwwroot(/.*)?	gen_context(system_u:object_r:awstats_content_t,s0)
4fc70e2
+/usr/share/awstats/wwwroot/cgi-bin(/.*)?	gen_context(system_u:object_r:awstats_script_exec_t,s0)
4fc70e2
 
4fc70e2
 /var/lib/awstats(/.*)?	gen_context(system_u:object_r:awstats_var_lib_t,s0)
4fc70e2
diff --git a/awstats.te b/awstats.te
4fc70e2
index c222135..ffbf2cb 100644
4fc70e2
--- a/awstats.te
4fc70e2
+++ b/awstats.te
4fc70e2
@@ -26,6 +26,7 @@ type awstats_var_lib_t;
4fc70e2
 files_type(awstats_var_lib_t)
4fc70e2
 
4fc70e2
 apache_content_template(awstats)
4fc70e2
+apache_content_alias_template(awstats, awstats)
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
 #
4fc70e2
@@ -40,9 +41,9 @@ files_tmp_filetrans(awstats_t, awstats_tmp_t, { dir file })
4fc70e2
 
4fc70e2
 manage_files_pattern(awstats_t, awstats_var_lib_t, awstats_var_lib_t)
4fc70e2
 
4fc70e2
-allow awstats_t { httpd_awstats_content_t  httpd_awstats_script_exec_t }:dir search_dir_perms;
4fc70e2
+allow awstats_t { awstats_content_t  awstats_script_exec_t }:dir search_dir_perms;
4fc70e2
 
4fc70e2
-can_exec(awstats_t, { awstats_exec_t httpd_awstats_script_exec_t })
4fc70e2
+can_exec(awstats_t, { awstats_exec_t awstats_script_exec_t })
4fc70e2
 
4fc70e2
 kernel_dontaudit_read_system_state(awstats_t)
4fc70e2
 
4fc70e2
@@ -86,13 +87,13 @@ optional_policy(`
4fc70e2
 # CGI local policy
4fc70e2
 #
4fc70e2
 
4fc70e2
-apache_read_log(httpd_awstats_script_t)
4fc70e2
+apache_read_log(awstats_script_t)
4fc70e2
 
4fc70e2
-manage_dirs_pattern(httpd_awstats_script_t, awstats_tmp_t, awstats_tmp_t)
4fc70e2
-manage_files_pattern(httpd_awstats_script_t, awstats_tmp_t, awstats_tmp_t)
4fc70e2
-files_tmp_filetrans(httpd_awstats_script_t, awstats_tmp_t, { dir file })
4fc70e2
+manage_dirs_pattern(awstats_script_t, awstats_tmp_t, awstats_tmp_t)
4fc70e2
+manage_files_pattern(awstats_script_t, awstats_tmp_t, awstats_tmp_t)
4fc70e2
+files_tmp_filetrans(awstats_script_t, awstats_tmp_t, { dir file })
4fc70e2
 
4fc70e2
-allow httpd_awstats_script_t awstats_var_lib_t:dir list_dir_perms;
4fc70e2
+allow awstats_script_t awstats_var_lib_t:dir list_dir_perms;
4fc70e2
 
4fc70e2
-read_files_pattern(httpd_awstats_script_t, awstats_var_lib_t, awstats_var_lib_t)
4fc70e2
-files_search_var_lib(httpd_awstats_script_t)
4fc70e2
+read_files_pattern(awstats_script_t, awstats_var_lib_t, awstats_var_lib_t)
4fc70e2
+files_search_var_lib(awstats_script_t)
4fc70e2
diff --git a/bugzilla.fc b/bugzilla.fc
4fc70e2
index fb6e397..9efceac 100644
4fc70e2
--- a/bugzilla.fc
4fc70e2
+++ b/bugzilla.fc
4fc70e2
@@ -1,4 +1,4 @@
4fc70e2
-/usr/share/bugzilla(/.*)?		gen_context(system_u:object_r:httpd_bugzilla_content_t,s0)
4fc70e2
-/usr/share/bugzilla/.*\.cgi	--	gen_context(system_u:object_r:httpd_bugzilla_script_exec_t,s0)
4fc70e2
+/usr/share/bugzilla(/.*)?		gen_context(system_u:object_r:bugzilla_content_t,s0)
4fc70e2
+/usr/share/bugzilla/.*\.cgi	--	gen_context(system_u:object_r:bugzilla_script_exec_t,s0)
4fc70e2
 
4fc70e2
-/var/lib/bugzilla(/.*)?	gen_context(system_u:object_r:httpd_bugzilla_rw_content_t,s0)
4fc70e2
+/var/lib/bugzilla(/.*)?	gen_context(system_u:object_r:bugzilla_rw_content_t,s0)
4fc70e2
diff --git a/bugzilla.if b/bugzilla.if
4fc70e2
index bf0cefa..d9ea246 100644
4fc70e2
--- a/bugzilla.if
4fc70e2
+++ b/bugzilla.if
4fc70e2
@@ -12,10 +12,10 @@
4fc70e2
 #
4fc70e2
 interface(`bugzilla_search_content',`
4fc70e2
 	gen_require(`
4fc70e2
-		type httpd_bugzilla_content_t;
4fc70e2
+		type bugzilla_content_t;
4fc70e2
 	')
4fc70e2
 
4fc70e2
-	allow $1 httpd_bugzilla_content_t:dir search_dir_perms;
4fc70e2
+	allow $1 bugzilla_content_t:dir search_dir_perms;
4fc70e2
 ')
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
@@ -32,10 +32,10 @@ interface(`bugzilla_search_content',`
4fc70e2
 #
4fc70e2
 interface(`bugzilla_dontaudit_rw_stream_sockets',`
4fc70e2
 	gen_require(`
4fc70e2
-		type httpd_bugzilla_script_t;
4fc70e2
+		type bugzilla_script_t;
4fc70e2
 	')
4fc70e2
 
4fc70e2
-	dontaudit $1 httpd_bugzilla_script_t:unix_stream_socket { read write };
4fc70e2
+	dontaudit $1 bugzilla_script_t:unix_stream_socket { read write };
4fc70e2
 ')
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
@@ -51,32 +51,32 @@ interface(`bugzilla_dontaudit_rw_stream_sockets',`
4fc70e2
 #
4fc70e2
 interface(`bugzilla_admin',`
4fc70e2
 	gen_require(`
4fc70e2
-		type httpd_bugzilla_script_t, httpd_bugzilla_content_t, httpd_bugzilla_ra_content_t;
4fc70e2
-		type httpd_bugzilla_rw_content_t, httpd_bugzilla_script_exec_t;
4fc70e2
-		type httpd_bugzilla_htaccess_t, httpd_bugzilla_tmp_t;
4fc70e2
+		type bugzilla_script_t, bugzilla_content_t, bugzilla_ra_content_t;
4fc70e2
+		type bugzilla_rw_content_t, bugzilla_script_exec_t;
4fc70e2
+		type bugzilla_htaccess_t, bugzilla_tmp_t;
4fc70e2
 	')
4fc70e2
 
4fc70e2
-	allow $1 httpd_bugzilla_script_t:process signal_perms;
4fc70e2
-	ps_process_pattern($1, httpd_bugzilla_script_t)
4fc70e2
+	allow $1 bugzilla_script_t:process signal_perms;
4fc70e2
+	ps_process_pattern($1, bugzilla_script_t)
4fc70e2
 
4fc70e2
 	tunable_policy(`deny_ptrace',`',`
4fc70e2
-		allow $1 httpd_bugzilla_script_t:process ptrace;
4fc70e2
+		allow $1 bugzilla_script_t:process ptrace;
4fc70e2
 	')
4fc70e2
 
4fc70e2
 	files_list_tmp($1)
4fc70e2
-	admin_pattern($1, httpd_bugzilla_tmp_t)
4fc70e2
+	admin_pattern($1, bugzilla_tmp_t)
4fc70e2
 
4fc70e2
-	files_list_var_lib(httpd_bugzilla_script_t)
4fc70e2
+	files_list_var_lib(bugzilla_script_t)
4fc70e2
 
4fc70e2
-	admin_pattern($1, httpd_bugzilla_script_exec_t)
4fc70e2
-	admin_pattern($1, httpd_bugzilla_script_t)
4fc70e2
-	admin_pattern($1, httpd_bugzilla_content_t)
4fc70e2
-	admin_pattern($1, httpd_bugzilla_htaccess_t)
4fc70e2
-	admin_pattern($1, httpd_bugzilla_ra_content_t)
4fc70e2
+	admin_pattern($1, bugzilla_script_exec_t)
4fc70e2
+	admin_pattern($1, bugzilla_script_t)
4fc70e2
+	admin_pattern($1, bugzilla_content_t)
4fc70e2
+	admin_pattern($1, bugzilla_htaccess_t)
4fc70e2
+	admin_pattern($1, bugzilla_ra_content_t)
4fc70e2
 
4fc70e2
 	files_search_tmp($1)
4fc70e2
 	files_search_var_lib($1)
4fc70e2
-	admin_pattern($1, httpd_bugzilla_rw_content_t)
4fc70e2
+	admin_pattern($1, bugzilla_rw_content_t)
4fc70e2
 
4fc70e2
 	optional_policy(`
4fc70e2
 		apache_list_sys_content($1)
4fc70e2
diff --git a/bugzilla.te b/bugzilla.te
4fc70e2
index d9f3061..c62f617 100644
4fc70e2
--- a/bugzilla.te
4fc70e2
+++ b/bugzilla.te
4fc70e2
@@ -6,54 +6,55 @@ policy_module(bugzilla, 1.1.0)
4fc70e2
 #
4fc70e2
 
4fc70e2
 apache_content_template(bugzilla)
4fc70e2
+apache_content_alias_template(bugzilla, bugzilla)
4fc70e2
 
4fc70e2
-type httpd_bugzilla_tmp_t;
4fc70e2
-files_tmp_file(httpd_bugzilla_tmp_t)
4fc70e2
+type bugzilla_tmp_t alias httpd_bugzilla_tmp_t;
4fc70e2
+files_tmp_file(bugzilla_tmp_t)
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
 #
4fc70e2
 # Local policy
4fc70e2
 #
4fc70e2
 
4fc70e2
-allow httpd_bugzilla_script_t self:tcp_socket { accept listen };
4fc70e2
+allow bugzilla_script_t self:tcp_socket { accept listen };
4fc70e2
 
4fc70e2
-corenet_all_recvfrom_netlabel(httpd_bugzilla_script_t)
4fc70e2
-corenet_tcp_sendrecv_generic_if(httpd_bugzilla_script_t)
4fc70e2
-corenet_tcp_sendrecv_generic_node(httpd_bugzilla_script_t)
4fc70e2
+corenet_all_recvfrom_netlabel(bugzilla_script_t)
4fc70e2
+corenet_tcp_sendrecv_generic_if(bugzilla_script_t)
4fc70e2
+corenet_tcp_sendrecv_generic_node(bugzilla_script_t)
4fc70e2
 
4fc70e2
-corenet_sendrecv_http_client_packets(httpd_bugzilla_script_t)
4fc70e2
-corenet_tcp_connect_http_port(httpd_bugzilla_script_t)
4fc70e2
-corenet_tcp_sendrecv_http_port(httpd_bugzilla_script_t)
4fc70e2
+corenet_sendrecv_http_client_packets(bugzilla_script_t)
4fc70e2
+corenet_tcp_connect_http_port(bugzilla_script_t)
4fc70e2
+corenet_tcp_sendrecv_http_port(bugzilla_script_t)
4fc70e2
 
4fc70e2
-corenet_sendrecv_smtp_client_packets(httpd_bugzilla_script_t)
4fc70e2
-corenet_tcp_connect_smtp_port(httpd_bugzilla_script_t)
4fc70e2
-corenet_tcp_sendrecv_smtp_port(httpd_bugzilla_script_t)
4fc70e2
+corenet_sendrecv_smtp_client_packets(bugzilla_script_t)
4fc70e2
+corenet_tcp_connect_smtp_port(bugzilla_script_t)
4fc70e2
+corenet_tcp_sendrecv_smtp_port(bugzilla_script_t)
4fc70e2
 
4fc70e2
-manage_dirs_pattern(httpd_bugzilla_script_t, httpd_bugzilla_tmp_t, httpd_bugzilla_tmp_t)
4fc70e2
-manage_files_pattern(httpd_bugzilla_script_t, httpd_bugzilla_tmp_t, httpd_bugzilla_tmp_t)
4fc70e2
-files_tmp_filetrans(httpd_bugzilla_script_t, httpd_bugzilla_tmp_t, { file dir })
4fc70e2
+manage_dirs_pattern(bugzilla_script_t, bugzilla_tmp_t, bugzilla_tmp_t)
4fc70e2
+manage_files_pattern(bugzilla_script_t, bugzilla_tmp_t, bugzilla_tmp_t)
4fc70e2
+files_tmp_filetrans(bugzilla_script_t, bugzilla_tmp_t, { file dir })
4fc70e2
 
4fc70e2
-files_search_var_lib(httpd_bugzilla_script_t)
4fc70e2
+files_search_var_lib(bugzilla_script_t)
4fc70e2
 
4fc70e2
-auth_read_passwd(httpd_bugzilla_script_t)
4fc70e2
+auth_read_passwd(bugzilla_script_t)
4fc70e2
 
4fc70e2
-dev_read_sysfs(httpd_bugzilla_script_t)
4fc70e2
+dev_read_sysfs(bugzilla_script_t)
4fc70e2
 
4fc70e2
-sysnet_read_config(httpd_bugzilla_script_t)
4fc70e2
-sysnet_use_ldap(httpd_bugzilla_script_t)
4fc70e2
+sysnet_read_config(bugzilla_script_t)
4fc70e2
+sysnet_use_ldap(bugzilla_script_t)
4fc70e2
 
4fc70e2
-miscfiles_read_certs(httpd_bugzilla_script_t)
4fc70e2
+miscfiles_read_certs(bugzilla_script_t)
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
-	mta_send_mail(httpd_bugzilla_script_t)
4fc70e2
+	mta_send_mail(bugzilla_script_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
-	mysql_stream_connect(httpd_bugzilla_script_t)
4fc70e2
-	mysql_tcp_connect(httpd_bugzilla_script_t)
4fc70e2
+	mysql_stream_connect(bugzilla_script_t)
4fc70e2
+	mysql_tcp_connect(bugzilla_script_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
-	postgresql_stream_connect(httpd_bugzilla_script_t)
4fc70e2
-	postgresql_tcp_connect(httpd_bugzilla_script_t)
4fc70e2
+	postgresql_stream_connect(bugzilla_script_t)
4fc70e2
+	postgresql_tcp_connect(bugzilla_script_t)
4fc70e2
 ')
4fc70e2
diff --git a/collectd.fc b/collectd.fc
4fc70e2
index 2e7d7ed..8d70290 100644
4fc70e2
--- a/collectd.fc
4fc70e2
+++ b/collectd.fc
4fc70e2
@@ -8,4 +8,4 @@
4fc70e2
 
4fc70e2
 /var/run/collectd\.pid	--	gen_context(system_u:object_r:collectd_var_run_t,s0)
4fc70e2
 
4fc70e2
-/usr/share/collectd/collection3/bin/.*\.cgi	--	gen_context(system_u:object_r:httpd_collectd_script_exec_t,s0)
4fc70e2
+/usr/share/collectd/collection3/bin/.*\.cgi	--	gen_context(system_u:object_r:collectd_script_exec_t,s0)
4fc70e2
diff --git a/collectd.te b/collectd.te
4fc70e2
index dc0423c..d078b96 100644
4fc70e2
--- a/collectd.te
4fc70e2
+++ b/collectd.te
4fc70e2
@@ -30,9 +30,10 @@ type collectd_unit_file_t;
4fc70e2
 systemd_unit_file(collectd_unit_file_t)
4fc70e2
 
4fc70e2
 apache_content_template(collectd)
4fc70e2
+apache_content_alias_template(collectd, collectd)
4fc70e2
 
4fc70e2
-type httpd_collectd_script_tmp_t;
4fc70e2
-files_tmp_file(httpd_collectd_script_tmp_t)
4fc70e2
+type collectd_script_tmp_t alias httpd_collectd_script_tmp_t;
4fc70e2
+files_tmp_file(collectd_script_tmp_t)
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
 #
4fc70e2
@@ -102,13 +103,13 @@ optional_policy(`
4fc70e2
 #
4fc70e2
 
4fc70e2
 
4fc70e2
-files_search_var_lib(httpd_collectd_script_t)	
4fc70e2
-read_files_pattern(httpd_collectd_script_t, collectd_var_lib_t, collectd_var_lib_t)
4fc70e2
-list_dirs_pattern(httpd_collectd_script_t, collectd_var_lib_t, collectd_var_lib_t)
4fc70e2
-miscfiles_setattr_fonts_cache_dirs(httpd_collectd_script_t)
4fc70e2
+files_search_var_lib(collectd_script_t)	
4fc70e2
+read_files_pattern(collectd_script_t, collectd_var_lib_t, collectd_var_lib_t)
4fc70e2
+list_dirs_pattern(collectd_script_t, collectd_var_lib_t, collectd_var_lib_t)
4fc70e2
+miscfiles_setattr_fonts_cache_dirs(collectd_script_t)
4fc70e2
 
4fc70e2
-manage_dirs_pattern(httpd_collectd_script_t, httpd_collectd_script_tmp_t, httpd_collectd_script_tmp_t)
4fc70e2
-manage_files_pattern(httpd_collectd_script_t, httpd_collectd_script_tmp_t, httpd_collectd_script_tmp_t)
4fc70e2
-files_tmp_filetrans(httpd_collectd_script_t, httpd_collectd_script_tmp_t, { file dir })	
4fc70e2
+manage_dirs_pattern(collectd_script_t, collectd_script_tmp_t, collectd_script_tmp_t)
4fc70e2
+manage_files_pattern(collectd_script_t, collectd_script_tmp_t, collectd_script_tmp_t)
4fc70e2
+files_tmp_filetrans(collectd_script_t, collectd_script_tmp_t, { file dir })	
4fc70e2
 
4fc70e2
-auth_read_passwd(httpd_collectd_script_t)
4fc70e2
+auth_read_passwd(collectd_script_t)
4fc70e2
diff --git a/cvs.fc b/cvs.fc
4fc70e2
index 75c8be9..e07e602 100644
4fc70e2
--- a/cvs.fc
4fc70e2
+++ b/cvs.fc
4fc70e2
@@ -4,10 +4,10 @@
4fc70e2
 
4fc70e2
 /usr/bin/cvs	--	gen_context(system_u:object_r:cvs_exec_t,s0)
4fc70e2
 
4fc70e2
-/usr/share/cvsweb/cvsweb\.cgi	--	gen_context(system_u:object_r:httpd_cvs_script_exec_t,s0)
4fc70e2
+/usr/share/cvsweb/cvsweb\.cgi	--	gen_context(system_u:object_r:cvs_script_exec_t,s0)
4fc70e2
 
4fc70e2
 /var/cvs(/.*)?	gen_context(system_u:object_r:cvs_data_t,s0)
4fc70e2
 
4fc70e2
 /var/run/cvs\.pid	--	gen_context(system_u:object_r:cvs_var_run_t,s0)
4fc70e2
 
4fc70e2
-/var/www/cgi-bin/cvsweb\.cgi	--	gen_context(system_u:object_r:httpd_cvs_script_exec_t,s0)
4fc70e2
+/var/www/cgi-bin/cvsweb\.cgi	--	gen_context(system_u:object_r:cvs_script_exec_t,s0)
4fc70e2
diff --git a/cvs.te b/cvs.te
4fc70e2
index f98a932..c3502c3 100644
4fc70e2
--- a/cvs.te
4fc70e2
+++ b/cvs.te
4fc70e2
@@ -125,9 +125,10 @@ optional_policy(`
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
 	apache_content_template(cvs)
4fc70e2
+	apache_content_alias_template(cvs, cvs)
4fc70e2
 
4fc70e2
-	read_files_pattern(httpd_cvs_script_t, cvs_data_t, cvs_data_t)
4fc70e2
-	manage_dirs_pattern(httpd_cvs_script_t, cvs_tmp_t, cvs_tmp_t)
4fc70e2
-	manage_files_pattern(httpd_cvs_script_t, cvs_tmp_t, cvs_tmp_t)
4fc70e2
-	files_tmp_filetrans(httpd_cvs_script_t, cvs_tmp_t, { file dir })
4fc70e2
+	read_files_pattern(cvs_script_t, cvs_data_t, cvs_data_t)
4fc70e2
+	manage_dirs_pattern(cvs_script_t, cvs_tmp_t, cvs_tmp_t)
4fc70e2
+	manage_files_pattern(cvs_script_t, cvs_tmp_t, cvs_tmp_t)
4fc70e2
+	files_tmp_filetrans(cvs_script_t, cvs_tmp_t, { file dir })
4fc70e2
 ')
4fc70e2
diff --git a/dirsrv-admin.fc b/dirsrv-admin.fc
4fc70e2
index 8c44697..5e44c5e 100644
4fc70e2
--- a/dirsrv-admin.fc
4fc70e2
+++ b/dirsrv-admin.fc
4fc70e2
@@ -6,8 +6,8 @@
4fc70e2
 /usr/sbin/start-ds-admin	--	gen_context(system_u:object_r:dirsrvadmin_exec_t,s0)
4fc70e2
 /usr/sbin/stop-ds-admin		--	gen_context(system_u:object_r:dirsrvadmin_exec_t,s0)
4fc70e2
 
4fc70e2
-/usr/lib/dirsrv/cgi-bin(/.*)?	gen_context(system_u:object_r:httpd_dirsrvadmin_script_exec_t,s0)
4fc70e2
-/usr/lib/dirsrv/dsgw-cgi-bin(/.*)?	gen_context(system_u:object_r:httpd_dirsrvadmin_script_exec_t,s0)
4fc70e2
+/usr/lib/dirsrv/cgi-bin(/.*)?	gen_context(system_u:object_r:dirsrvadmin_script_exec_t,s0)
4fc70e2
+/usr/lib/dirsrv/dsgw-cgi-bin(/.*)?	gen_context(system_u:object_r:dirsrvadmin_script_exec_t,s0)
4fc70e2
 
4fc70e2
 /usr/lib/dirsrv/cgi-bin/ds_create    --  gen_context(system_u:object_r:dirsrvadmin_unconfined_script_exec_t,s0)
4fc70e2
 /usr/lib/dirsrv/cgi-bin/ds_remove    --  gen_context(system_u:object_r:dirsrvadmin_unconfined_script_exec_t,s0)
4fc70e2
diff --git a/dirsrv-admin.if b/dirsrv-admin.if
4fc70e2
index 30416f2..e360d38 100644
4fc70e2
--- a/dirsrv-admin.if
4fc70e2
+++ b/dirsrv-admin.if
4fc70e2
@@ -29,13 +29,13 @@ interface(`dirsrvadmin_run_exec',`
4fc70e2
 ##	</summary>
4fc70e2
 ## </param>
4fc70e2
 #
4fc70e2
-interface(`dirsrvadmin_run_httpd_script_exec',`
4fc70e2
+interface(`dirsrvadmin_run_script_exec',`
4fc70e2
 	gen_require(`
4fc70e2
-		type httpd_dirsrvadmin_script_exec_t;
4fc70e2
+		type dirsrvadmin_script_exec_t;
4fc70e2
 	')
4fc70e2
 
4fc70e2
-	allow $1 httpd_dirsrvadmin_script_exec_t:dir search_dir_perms;
4fc70e2
-	can_exec($1, httpd_dirsrvadmin_script_exec_t)
4fc70e2
+	allow $1 dirsrvadmin_script_exec_t:dir search_dir_perms;
4fc70e2
+	can_exec($1, dirsrvadmin_script_exec_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
diff --git a/dirsrv-admin.te b/dirsrv-admin.te
4fc70e2
index 021c5ae..37afbd4 100644
4fc70e2
--- a/dirsrv-admin.te
4fc70e2
+++ b/dirsrv-admin.te
4fc70e2
@@ -70,59 +70,60 @@ optional_policy(`
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
 	apache_content_template(dirsrvadmin)
4fc70e2
+	apache_content_alias_template(dirsrvadmin, dirsrvadmin)
4fc70e2
 
4fc70e2
-	allow httpd_dirsrvadmin_script_t self:process { getsched getpgid };
4fc70e2
-	allow httpd_dirsrvadmin_script_t self:capability { fowner fsetid setuid net_bind_service setgid chown sys_nice kill dac_read_search dac_override };
4fc70e2
-	allow httpd_dirsrvadmin_script_t self:tcp_socket create_stream_socket_perms;
4fc70e2
-	allow httpd_dirsrvadmin_script_t self:udp_socket create_socket_perms;
4fc70e2
-	allow httpd_dirsrvadmin_script_t self:unix_dgram_socket create_socket_perms;
4fc70e2
-	allow httpd_dirsrvadmin_script_t self:netlink_route_socket r_netlink_socket_perms;
4fc70e2
-	allow httpd_dirsrvadmin_script_t self:sem create_sem_perms;
4fc70e2
+	allow dirsrvadmin_script_t self:process { getsched getpgid };
4fc70e2
+	allow dirsrvadmin_script_t self:capability { fowner fsetid setuid net_bind_service setgid chown sys_nice kill dac_read_search dac_override };
4fc70e2
+	allow dirsrvadmin_script_t self:tcp_socket create_stream_socket_perms;
4fc70e2
+	allow dirsrvadmin_script_t self:udp_socket create_socket_perms;
4fc70e2
+	allow dirsrvadmin_script_t self:unix_dgram_socket create_socket_perms;
4fc70e2
+	allow dirsrvadmin_script_t self:netlink_route_socket r_netlink_socket_perms;
4fc70e2
+	allow dirsrvadmin_script_t self:sem create_sem_perms;
4fc70e2
 
4fc70e2
 
4fc70e2
-	manage_files_pattern(httpd_dirsrvadmin_script_t, dirsrvadmin_lock_t, dirsrvadmin_lock_t)
4fc70e2
-	files_lock_filetrans(httpd_dirsrvadmin_script_t, dirsrvadmin_lock_t, { file })
4fc70e2
+	manage_files_pattern(dirsrvadmin_script_t, dirsrvadmin_lock_t, dirsrvadmin_lock_t)
4fc70e2
+	files_lock_filetrans(dirsrvadmin_script_t, dirsrvadmin_lock_t, { file })
4fc70e2
 
4fc70e2
-	kernel_read_kernel_sysctls(httpd_dirsrvadmin_script_t)
4fc70e2
+	kernel_read_kernel_sysctls(dirsrvadmin_script_t)
4fc70e2
 
4fc70e2
 
4fc70e2
-	corenet_tcp_bind_generic_node(httpd_dirsrvadmin_script_t)
4fc70e2
-	corenet_udp_bind_generic_node(httpd_dirsrvadmin_script_t)
4fc70e2
-	corenet_all_recvfrom_netlabel(httpd_dirsrvadmin_script_t)
4fc70e2
+	corenet_tcp_bind_generic_node(dirsrvadmin_script_t)
4fc70e2
+	corenet_udp_bind_generic_node(dirsrvadmin_script_t)
4fc70e2
+	corenet_all_recvfrom_netlabel(dirsrvadmin_script_t)
4fc70e2
 
4fc70e2
-	corenet_tcp_bind_http_port(httpd_dirsrvadmin_script_t)
4fc70e2
-	corenet_tcp_connect_generic_port(httpd_dirsrvadmin_script_t)
4fc70e2
-	corenet_tcp_connect_ldap_port(httpd_dirsrvadmin_script_t)
4fc70e2
-	corenet_tcp_connect_http_port(httpd_dirsrvadmin_script_t)
4fc70e2
+	corenet_tcp_bind_http_port(dirsrvadmin_script_t)
4fc70e2
+	corenet_tcp_connect_generic_port(dirsrvadmin_script_t)
4fc70e2
+	corenet_tcp_connect_ldap_port(dirsrvadmin_script_t)
4fc70e2
+	corenet_tcp_connect_http_port(dirsrvadmin_script_t)
4fc70e2
 
4fc70e2
-	files_search_var_lib(httpd_dirsrvadmin_script_t)
4fc70e2
+	files_search_var_lib(dirsrvadmin_script_t)
4fc70e2
 
4fc70e2
-	sysnet_read_config(httpd_dirsrvadmin_script_t)
4fc70e2
+	sysnet_read_config(dirsrvadmin_script_t)
4fc70e2
 
4fc70e2
-	manage_files_pattern(httpd_dirsrvadmin_script_t, dirsrvadmin_tmp_t, dirsrvadmin_tmp_t)
4fc70e2
-	manage_dirs_pattern(httpd_dirsrvadmin_script_t, dirsrvadmin_tmp_t, dirsrvadmin_tmp_t)
4fc70e2
-	files_tmp_filetrans(httpd_dirsrvadmin_script_t, dirsrvadmin_tmp_t, { file dir })
4fc70e2
+	manage_files_pattern(dirsrvadmin_script_t, dirsrvadmin_tmp_t, dirsrvadmin_tmp_t)
4fc70e2
+	manage_dirs_pattern(dirsrvadmin_script_t, dirsrvadmin_tmp_t, dirsrvadmin_tmp_t)
4fc70e2
+	files_tmp_filetrans(dirsrvadmin_script_t, dirsrvadmin_tmp_t, { file dir })
4fc70e2
 
4fc70e2
 	optional_policy(`
4fc70e2
-		apache_read_modules(httpd_dirsrvadmin_script_t)
4fc70e2
-		apache_read_config(httpd_dirsrvadmin_script_t)
4fc70e2
-		apache_signal(httpd_dirsrvadmin_script_t)
4fc70e2
-		apache_signull(httpd_dirsrvadmin_script_t)
4fc70e2
+		apache_read_modules(dirsrvadmin_script_t)
4fc70e2
+		apache_read_config(dirsrvadmin_script_t)
4fc70e2
+		apache_signal(dirsrvadmin_script_t)
4fc70e2
+		apache_signull(dirsrvadmin_script_t)
4fc70e2
 	')
4fc70e2
 
4fc70e2
 	optional_policy(`
4fc70e2
 		# The CGI scripts must be able to manage dirsrv-admin
4fc70e2
-		dirsrvadmin_run_exec(httpd_dirsrvadmin_script_t)
4fc70e2
-		dirsrvadmin_manage_config(httpd_dirsrvadmin_script_t)
4fc70e2
-		dirsrv_domtrans(httpd_dirsrvadmin_script_t)
4fc70e2
-		dirsrv_signal(httpd_dirsrvadmin_script_t)
4fc70e2
-		dirsrv_signull(httpd_dirsrvadmin_script_t)
4fc70e2
-		dirsrv_manage_log(httpd_dirsrvadmin_script_t)
4fc70e2
-		dirsrv_manage_var_lib(httpd_dirsrvadmin_script_t)
4fc70e2
-		dirsrv_pid_filetrans(httpd_dirsrvadmin_script_t)
4fc70e2
-		dirsrv_manage_var_run(httpd_dirsrvadmin_script_t)
4fc70e2
-		dirsrv_manage_config(httpd_dirsrvadmin_script_t)
4fc70e2
-		dirsrv_read_share(httpd_dirsrvadmin_script_t)
4fc70e2
+		dirsrvadmin_run_exec(dirsrvadmin_script_t)
4fc70e2
+		dirsrvadmin_manage_config(dirsrvadmin_script_t)
4fc70e2
+		dirsrv_domtrans(dirsrvadmin_script_t)
4fc70e2
+		dirsrv_signal(dirsrvadmin_script_t)
4fc70e2
+		dirsrv_signull(dirsrvadmin_script_t)
4fc70e2
+		dirsrv_manage_log(dirsrvadmin_script_t)
4fc70e2
+		dirsrv_manage_var_lib(dirsrvadmin_script_t)
4fc70e2
+		dirsrv_pid_filetrans(dirsrvadmin_script_t)
4fc70e2
+		dirsrv_manage_var_run(dirsrvadmin_script_t)
4fc70e2
+		dirsrv_manage_config(dirsrvadmin_script_t)
4fc70e2
+		dirsrv_read_share(dirsrvadmin_script_t)
4fc70e2
 	')
4fc70e2
 ')
4fc70e2
 
4fc70e2
diff --git a/dspam.fc b/dspam.fc
4fc70e2
index 3ea0423..b5fcb77 100644
4fc70e2
--- a/dspam.fc
4fc70e2
+++ b/dspam.fc
4fc70e2
@@ -2,7 +2,7 @@
4fc70e2
 
4fc70e2
 /usr/bin/dspam	--	gen_context(system_u:object_r:dspam_exec_t,s0)
4fc70e2
 
4fc70e2
-/usr/share/dspam-web/dspam\.cgi	--	gen_context(system_u:object_r:httpd_dspam_script_exec_t,s0)
4fc70e2
+/usr/share/dspam-web/dspam\.cgi	--	gen_context(system_u:object_r:dspam_script_exec_t,s0)
4fc70e2
 
4fc70e2
 /var/lib/dspam(/.*)?	gen_context(system_u:object_r:dspam_var_lib_t,s0)
4fc70e2
 
4fc70e2
@@ -11,7 +11,7 @@
4fc70e2
 /var/run/dspam(/.*)?	gen_context(system_u:object_r:dspam_var_run_t,s0)
4fc70e2
 
4fc70e2
 # web
4fc70e2
-/var/www/dspam/.*\.cgi 	--	gen_context(system_u:object_r:httpd_dspam_script_exec_t,s0)
4fc70e2
-/var/www/dspam(/.*?)		gen_context(system_u:object_r:httpd_dspam_content_t,s0)
4fc70e2
+/var/www/dspam/.*\.cgi 	--	gen_context(system_u:object_r:dspam_script_exec_t,s0)
4fc70e2
+/var/www/dspam(/.*?)		gen_context(system_u:object_r:dspam_content_t,s0)
4fc70e2
 
4fc70e2
-/var/lib/dspam/data(/.*)?			gen_context(system_u:object_r:httpd_dspam_rw_content_t,s0)
4fc70e2
+/var/lib/dspam/data(/.*)?			gen_context(system_u:object_r:dspam_rw_content_t,s0)
4fc70e2
diff --git a/dspam.te b/dspam.te
4fc70e2
index 37c844b..1ec4d89 100644
4fc70e2
--- a/dspam.te
4fc70e2
+++ b/dspam.te
4fc70e2
@@ -75,29 +75,27 @@ logging_send_syslog_msg(dspam_t)
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
 	apache_content_template(dspam)
4fc70e2
+	apache_content_alias_template(dspam, dspam)
4fc70e2
 
4fc70e2
-	read_files_pattern(httpd_dspam_script_t, dspam_var_lib_t, dspam_var_lib_t)
4fc70e2
+	read_files_pattern(dspam_script_t, dspam_var_lib_t, dspam_var_lib_t)
4fc70e2
 
4fc70e2
-	files_search_var_lib(httpd_dspam_script_t)
4fc70e2
-	list_dirs_pattern(dspam_t, httpd_dspam_content_t, httpd_dspam_content_t)
4fc70e2
-	manage_dirs_pattern(dspam_t, httpd_dspam_content_rw_t, httpd_dspam_content_rw_t)
4fc70e2
-	manage_files_pattern(dspam_t, httpd_dspam_content_rw_t, httpd_dspam_content_rw_t)
4fc70e2
+	files_search_var_lib(dspam_script_t)
4fc70e2
 
4fc70e2
-	domain_dontaudit_read_all_domains_state(httpd_dspam_script_t)
4fc70e2
+	domain_dontaudit_read_all_domains_state(dspam_script_t)
4fc70e2
 
4fc70e2
-	term_dontaudit_search_ptys(httpd_dspam_script_t)
4fc70e2
-	term_dontaudit_getattr_all_ttys(httpd_dspam_script_t)
4fc70e2
-	term_dontaudit_getattr_all_ptys(httpd_dspam_script_t)
4fc70e2
+	term_dontaudit_search_ptys(dspam_script_t)
4fc70e2
+	term_dontaudit_getattr_all_ttys(dspam_script_t)
4fc70e2
+	term_dontaudit_getattr_all_ptys(dspam_script_t)
4fc70e2
 
4fc70e2
-	init_read_utmp(httpd_dspam_script_t)
4fc70e2
+	init_read_utmp(dspam_script_t)
4fc70e2
 
4fc70e2
-	logging_send_syslog_msg(httpd_dspam_script_t)
4fc70e2
+	logging_send_syslog_msg(dspam_script_t)
4fc70e2
 
4fc70e2
-	mta_send_mail(httpd_dspam_script_t)
4fc70e2
+	mta_send_mail(dspam_script_t)
4fc70e2
 
4fc70e2
 	optional_policy(`
4fc70e2
-	    mysql_tcp_connect(httpd_dspam_script_t)
4fc70e2
-	    mysql_stream_connect(httpd_dspam_script_t)
4fc70e2
+	    mysql_tcp_connect(dspam_script_t)
4fc70e2
+	    mysql_stream_connect(dspam_script_t)
4fc70e2
 	')
4fc70e2
 ')
4fc70e2
 
4fc70e2
diff --git a/git.fc b/git.fc
4fc70e2
index 24700f8..6561d56 100644
4fc70e2
--- a/git.fc
4fc70e2
+++ b/git.fc
4fc70e2
@@ -2,12 +2,12 @@ HOME_DIR/public_git(/.*)?	gen_context(system_u:object_r:git_user_content_t,s0)
4fc70e2
 
4fc70e2
 /usr/libexec/git-core/git-daemon	--	gen_context(system_u:object_r:gitd_exec_t,s0)
4fc70e2
 
4fc70e2
-/var/cache/cgit(/.*)?	gen_context(system_u:object_r:httpd_git_rw_content_t,s0)
4fc70e2
-/var/cache/gitweb-caching(/.*)?	gen_context(system_u:object_r:httpd_git_rw_content_t,s0)
4fc70e2
+/var/cache/cgit(/.*)?	gen_context(system_u:object_r:git_rw_content_t,s0)
4fc70e2
+/var/cache/gitweb-caching(/.*)?	gen_context(system_u:object_r:git_rw_content_t,s0)
4fc70e2
 
4fc70e2
 /var/lib/git(/.*)?	gen_context(system_u:object_r:git_sys_content_t,s0)
4fc70e2
 
4fc70e2
-/var/www/cgi-bin/cgit	--	gen_context(system_u:object_r:httpd_git_script_exec_t,s0)
4fc70e2
-/var/www/git(/.*)?	gen_context(system_u:object_r:httpd_git_content_t,s0)
4fc70e2
-/var/www/git/gitweb\.cgi	--	gen_context(system_u:object_r:httpd_git_script_exec_t,s0)
4fc70e2
-/var/www/gitweb-caching/gitweb\.cgi	--	gen_context(system_u:object_r:httpd_git_script_exec_t,s0)
4fc70e2
+/var/www/cgi-bin/cgit	--	gen_context(system_u:object_r:git_script_exec_t,s0)
4fc70e2
+/var/www/git(/.*)?	gen_context(system_u:object_r:git_content_t,s0)
4fc70e2
+/var/www/git/gitweb\.cgi	--	gen_context(system_u:object_r:git_script_exec_t,s0)
4fc70e2
+/var/www/gitweb-caching/gitweb\.cgi	--	gen_context(system_u:object_r:git_script_exec_t,s0)
4fc70e2
diff --git a/git.te b/git.te
4fc70e2
index 2609364..d3caffa 100644
4fc70e2
--- a/git.te
4fc70e2
+++ b/git.te
4fc70e2
@@ -75,6 +75,7 @@ attribute git_daemon;
4fc70e2
 attribute_role git_session_roles;
4fc70e2
 
4fc70e2
 apache_content_template(git)
4fc70e2
+apache_content_alias_template(git, git)
4fc70e2
 
4fc70e2
 type git_system_t, git_daemon;
4fc70e2
 type gitd_exec_t;
4fc70e2
@@ -210,48 +211,48 @@ tunable_policy(`git_system_use_nfs',`
4fc70e2
 # CGI policy
4fc70e2
 #
4fc70e2
 
4fc70e2
-list_dirs_pattern(httpd_git_script_t, { git_sys_content_t git_user_content_t }, { git_sys_content_t git_user_content_t })
4fc70e2
-read_files_pattern(httpd_git_script_t, { git_sys_content_t git_user_content_t }, { git_sys_content_t git_user_content_t })
4fc70e2
-files_search_var_lib(httpd_git_script_t)
4fc70e2
+list_dirs_pattern(git_script_t, { git_sys_content_t git_user_content_t }, { git_sys_content_t git_user_content_t })
4fc70e2
+read_files_pattern(git_script_t, { git_sys_content_t git_user_content_t }, { git_sys_content_t git_user_content_t })
4fc70e2
+files_search_var_lib(git_script_t)
4fc70e2
 
4fc70e2
-files_dontaudit_getattr_tmp_dirs(httpd_git_script_t)
4fc70e2
+files_dontaudit_getattr_tmp_dirs(git_script_t)
4fc70e2
 
4fc70e2
-auth_use_nsswitch(httpd_git_script_t)
4fc70e2
+auth_use_nsswitch(git_script_t)
4fc70e2
 
4fc70e2
 tunable_policy(`git_cgi_enable_homedirs',`
4fc70e2
-	userdom_search_user_home_dirs(httpd_git_script_t)
4fc70e2
+	userdom_search_user_home_dirs(git_script_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 tunable_policy(`git_cgi_enable_homedirs && use_nfs_home_dirs',`
4fc70e2
-	fs_getattr_nfs(httpd_git_script_t)
4fc70e2
-	fs_list_nfs(httpd_git_script_t)
4fc70e2
-	fs_read_nfs_files(httpd_git_script_t)
4fc70e2
+	fs_getattr_nfs(git_script_t)
4fc70e2
+	fs_list_nfs(git_script_t)
4fc70e2
+	fs_read_nfs_files(git_script_t)
4fc70e2
 ',`
4fc70e2
-	fs_dontaudit_read_nfs_files(httpd_git_script_t)
4fc70e2
+	fs_dontaudit_read_nfs_files(git_script_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 tunable_policy(`git_cgi_enable_homedirs && use_samba_home_dirs',`
4fc70e2
-	fs_getattr_cifs(httpd_git_script_t)
4fc70e2
-	fs_list_cifs(httpd_git_script_t)
4fc70e2
-	fs_read_cifs_files(httpd_git_script_t)
4fc70e2
+	fs_getattr_cifs(git_script_t)
4fc70e2
+	fs_list_cifs(git_script_t)
4fc70e2
+	fs_read_cifs_files(git_script_t)
4fc70e2
 ',`
4fc70e2
-	fs_dontaudit_read_cifs_files(httpd_git_script_t)
4fc70e2
+	fs_dontaudit_read_cifs_files(git_script_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 tunable_policy(`git_cgi_use_cifs',`
4fc70e2
-	fs_getattr_cifs(httpd_git_script_t)
4fc70e2
-	fs_list_cifs(httpd_git_script_t)
4fc70e2
-	fs_read_cifs_files(httpd_git_script_t)
4fc70e2
+	fs_getattr_cifs(git_script_t)
4fc70e2
+	fs_list_cifs(git_script_t)
4fc70e2
+	fs_read_cifs_files(git_script_t)
4fc70e2
 ',`
4fc70e2
-	fs_dontaudit_read_cifs_files(httpd_git_script_t)
4fc70e2
+	fs_dontaudit_read_cifs_files(git_script_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 tunable_policy(`git_cgi_use_nfs',`
4fc70e2
-	fs_getattr_nfs(httpd_git_script_t)
4fc70e2
-	fs_list_nfs(httpd_git_script_t)
4fc70e2
-	fs_read_nfs_files(httpd_git_script_t)
4fc70e2
+	fs_getattr_nfs(git_script_t)
4fc70e2
+	fs_list_nfs(git_script_t)
4fc70e2
+	fs_read_nfs_files(git_script_t)
4fc70e2
 ',`
4fc70e2
-	fs_dontaudit_read_nfs_files(httpd_git_script_t)
4fc70e2
+	fs_dontaudit_read_nfs_files(git_script_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
diff --git a/lightsquid.fc b/lightsquid.fc
4fc70e2
index 044390c..63e2058 100644
4fc70e2
--- a/lightsquid.fc
4fc70e2
+++ b/lightsquid.fc
4fc70e2
@@ -1,11 +1,11 @@
4fc70e2
 /etc/cron\.daily/lightsquid	--	gen_context(system_u:object_r:lightsquid_exec_t,s0)
4fc70e2
 
4fc70e2
-/usr/lib/cgi-bin/lightsquid/.*\.cfg	--	gen_context(system_u:object_r:httpd_lightsquid_content_t,s0)
4fc70e2
-/usr/lib/cgi-bin/lightsquid/.*\.cgi	--	gen_context(system_u:object_r:httpd_lightsquid_script_exec_t,s0)
4fc70e2
+/usr/lib/cgi-bin/lightsquid/.*\.cfg	--	gen_context(system_u:object_r:lightsquid_content_t,s0)
4fc70e2
+/usr/lib/cgi-bin/lightsquid/.*\.cgi	--	gen_context(system_u:object_r:lightsquid_script_exec_t,s0)
4fc70e2
 
4fc70e2
-/usr/share/lightsquid/cgi/.*\.cgi	--	gen_context(system_u:object_r:httpd_lightsquid_script_exec_t,s0)
4fc70e2
+/usr/share/lightsquid/cgi/.*\.cgi	--	gen_context(system_u:object_r:lightsquid_script_exec_t,s0)
4fc70e2
 
4fc70e2
 /var/lightsquid(/.*)?	gen_context(system_u:object_r:lightsquid_rw_content_t,s0)
4fc70e2
 
4fc70e2
-/var/www/html/lightsquid(/.*)?	gen_context(system_u:object_r:httpd_lightsquid_content_t,s0)
4fc70e2
-/var/www/html/lightsquid/report(/.*)?	gen_context(system_u:object_r:lightsquid_rw_content_t,s0)
4fc70e2
+/var/www/html/lightsquid(/.*)?	gen_context(system_u:object_r:lightsquid_content_t,s0)
4fc70e2
+/var/www/html/lightsquid/report(/.*)?	gen_context(system_u:object_r:lightsquid_report_content_t,s0)
4fc70e2
diff --git a/lightsquid.te b/lightsquid.te
4fc70e2
index 75854ed..6c7855e 100644
4fc70e2
--- a/lightsquid.te
4fc70e2
+++ b/lightsquid.te
4fc70e2
@@ -13,18 +13,18 @@ type lightsquid_exec_t;
4fc70e2
 application_domain(lightsquid_t, lightsquid_exec_t)
4fc70e2
 role lightsquid_roles types lightsquid_t;
4fc70e2
 
4fc70e2
-type lightsquid_rw_content_t;
4fc70e2
-files_type(lightsquid_rw_content_t)
4fc70e2
+type lightsquid_report_content_t;
4fc70e2
+files_type(lightsquid_report_content_t)
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
 #
4fc70e2
 # Local policy
4fc70e2
 #
4fc70e2
 
4fc70e2
-manage_dirs_pattern(lightsquid_t, lightsquid_rw_content_t, lightsquid_rw_content_t)
4fc70e2
-manage_files_pattern(lightsquid_t, lightsquid_rw_content_t, lightsquid_rw_content_t)
4fc70e2
-manage_lnk_files_pattern(lightsquid_t, lightsquid_rw_content_t, lightsquid_rw_content_t)
4fc70e2
-files_var_filetrans(lightsquid_t, lightsquid_rw_content_t, dir)
4fc70e2
+manage_dirs_pattern(lightsquid_t, lightsquid_report_content_t, lightsquid_report_content_t)
4fc70e2
+manage_files_pattern(lightsquid_t, lightsquid_report_content_t, lightsquid_report_content_t)
4fc70e2
+manage_lnk_files_pattern(lightsquid_t, lightsquid_report_content_t, lightsquid_report_content_t)
4fc70e2
+files_var_filetrans(lightsquid_t, lightsquid_report_content_t, dir)
4fc70e2
 
4fc70e2
 corecmd_exec_bin(lightsquid_t)
4fc70e2
 corecmd_exec_shell(lightsquid_t)
4fc70e2
@@ -36,10 +36,11 @@ squid_read_log(lightsquid_t)
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
 	apache_content_template(lightsquid)
4fc70e2
+	apache_content_alias_template(lightsquid, lightsquid)
4fc70e2
 
4fc70e2
-	list_dirs_pattern(httpd_lightsquid_script_t, lightsquid_rw_content_t, lightsquid_rw_content_t)
4fc70e2
-	read_files_pattern(httpd_lightsquid_script_t, lightsquid_rw_content_t, lightsquid_rw_content_t)
4fc70e2
-	read_lnk_files_pattern(httpd_lightsquid_script_t, lightsquid_rw_content_t, lightsquid_rw_content_t)
4fc70e2
+	list_dirs_pattern(lightsquid_script_t, lightsquid_report_content_t, lightsquid_report_content_t)
4fc70e2
+	read_files_pattern(lightsquid_script_t, lightsquid_report_content_t, lightsquid_report_content_t)
4fc70e2
+	read_lnk_files_pattern(lightsquid_script_t, lightsquid_report_content_t, lightsquid_report_content_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
diff --git a/man2html.fc b/man2html.fc
4fc70e2
index 82f6255..3686732 100644
4fc70e2
--- a/man2html.fc
4fc70e2
+++ b/man2html.fc
4fc70e2
@@ -1,5 +1,5 @@
4fc70e2
-/usr/lib/man2html/cgi-bin/man/man2html	--	gen_context(system_u:object_r:httpd_man2html_script_exec_t,s0)
4fc70e2
-/usr/lib/man2html/cgi-bin/man/mansec	--	gen_context(system_u:object_r:httpd_man2html_script_exec_t,s0)
4fc70e2
-/usr/lib/man2html/cgi-bin/man/manwhatis	--	gen_context(system_u:object_r:httpd_man2html_script_exec_t,s0)
4fc70e2
+/usr/lib/man2html/cgi-bin/man/man2html	--	gen_context(system_u:object_r:man2html_script_exec_t,s0)
4fc70e2
+/usr/lib/man2html/cgi-bin/man/mansec	--	gen_context(system_u:object_r:man2html_script_exec_t,s0)
4fc70e2
+/usr/lib/man2html/cgi-bin/man/manwhatis	--	gen_context(system_u:object_r:man2html_script_exec_t,s0)
4fc70e2
 
4fc70e2
-/var/cache/man2html(/.*)?	gen_context(system_u:object_r:httpd_man2html_script_cache_t,s0)
4fc70e2
+/var/cache/man2html(/.*)?	gen_context(system_u:object_r:man2html_rw_content_t,s0)
4fc70e2
diff --git a/man2html.if b/man2html.if
4fc70e2
index fe43dea..53eaf61 100644
4fc70e2
--- a/man2html.if
4fc70e2
+++ b/man2html.if
4fc70e2
@@ -2,7 +2,7 @@
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
 ## <summary>
4fc70e2
-##	Transition to httpd_man2html_script.
4fc70e2
+##	Transition to man2html_script.
4fc70e2
 ## </summary>
4fc70e2
 ## <param name="domain">
4fc70e2
 ## <summary>
4fc70e2
@@ -10,18 +10,18 @@
4fc70e2
 ## </summary>
4fc70e2
 ## </param>
4fc70e2
 #
4fc70e2
-interface(`httpd_man2html_script_domtrans',`
4fc70e2
+interface(`man2html_script_domtrans',`
4fc70e2
 	gen_require(`
4fc70e2
-		type httpd_man2html_script_t, httpd_man2html_script_exec_t;
4fc70e2
+		type man2html_script_t, man2html_script_exec_t;
4fc70e2
 	')
4fc70e2
 
4fc70e2
 	corecmd_search_bin($1)
4fc70e2
-	domtrans_pattern($1, httpd_man2html_script_exec_t, httpd_man2html_script_t)
4fc70e2
+	domtrans_pattern($1, man2html_script_exec_t, man2html_script_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
 ## <summary>
4fc70e2
-##	Search httpd_man2html_script cache directories.
4fc70e2
+##	Search man2html_script content directories.
4fc70e2
 ## </summary>
4fc70e2
 ## <param name="domain">
4fc70e2
 ##	<summary>
4fc70e2
@@ -29,18 +29,19 @@ interface(`httpd_man2html_script_domtrans',`
4fc70e2
 ##	</summary>
4fc70e2
 ## </param>
4fc70e2
 #
4fc70e2
-interface(`httpd_man2html_script_search_cache',`
4fc70e2
+interface(`man2html_search_content',`
4fc70e2
 	gen_require(`
4fc70e2
-		type httpd_man2html_script_cache_t;
4fc70e2
+		type man2html_content_t;
4fc70e2
+		type man2html_rw_content_t;
4fc70e2
 	')
4fc70e2
 
4fc70e2
-	allow $1 httpd_man2html_script_cache_t:dir search_dir_perms;
4fc70e2
+	allow $1 { man2html_rw_content_t man2html_content_t }:dir search_dir_perms;
4fc70e2
 	files_search_var($1)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
 ## <summary>
4fc70e2
-##	Read httpd_man2html_script cache files.
4fc70e2
+##	Read man2html cache files.
4fc70e2
 ## </summary>
4fc70e2
 ## <param name="domain">
4fc70e2
 ##	<summary>
4fc70e2
@@ -48,19 +49,22 @@ interface(`httpd_man2html_script_search_cache',`
4fc70e2
 ##	</summary>
4fc70e2
 ## </param>
4fc70e2
 #
4fc70e2
-interface(`httpd_man2html_script_read_cache_files',`
4fc70e2
+interface(`man2html_read_content_files',`
4fc70e2
 	gen_require(`
4fc70e2
-		type httpd_man2html_script_cache_t;
4fc70e2
+		type man2html_content_t;
4fc70e2
+		type man2html_rw_content_t;
4fc70e2
 	')
4fc70e2
 
4fc70e2
 	files_search_var($1)
4fc70e2
-	read_files_pattern($1, httpd_man2html_script_cache_t, httpd_man2html_script_cache_t)
4fc70e2
+	allow $1 { man2html_rw_content_t man2html_content_t }:dir search_dir_perms;
4fc70e2
+	read_files_pattern($1, man2html_rw_content_t, man2html_rw_content_t)
4fc70e2
+	read_files_pattern($1, man2html_content_t, man2html_content_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
 ## <summary>
4fc70e2
 ##	Create, read, write, and delete
4fc70e2
-##	httpd_man2html_script cache files.
4fc70e2
+##	man2html content files.
4fc70e2
 ## </summary>
4fc70e2
 ## <param name="domain">
4fc70e2
 ##	<summary>
4fc70e2
@@ -68,18 +72,21 @@ interface(`httpd_man2html_script_read_cache_files',`
4fc70e2
 ##	</summary>
4fc70e2
 ## </param>
4fc70e2
 #
4fc70e2
-interface(`httpd_man2html_script_manage_cache_files',`
4fc70e2
+interface(`man2html_manage_content_files',`
4fc70e2
 	gen_require(`
4fc70e2
-		type httpd_man2html_script_cache_t;
4fc70e2
+		type man2html_content_t;
4fc70e2
+		type man2html_rw_content_t;
4fc70e2
 	')
4fc70e2
 
4fc70e2
 	files_search_var($1)
4fc70e2
-	manage_files_pattern($1, httpd_man2html_script_cache_t, httpd_man2html_script_cache_t)
4fc70e2
+	manage_files_pattern($1, man2html_rw_content_t, man2html_rw_content_t)
4fc70e2
+	manage_files_pattern($1, man2html_content_t, man2html_content_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
 ## <summary>
4fc70e2
-##	Manage httpd_man2html_script cache dirs.
4fc70e2
+##	Create, read, write, and delete
4fc70e2
+##	man2html content dirs.
4fc70e2
 ## </summary>
4fc70e2
 ## <param name="domain">
4fc70e2
 ##	<summary>
4fc70e2
@@ -87,20 +94,21 @@ interface(`httpd_man2html_script_manage_cache_files',`
4fc70e2
 ##	</summary>
4fc70e2
 ## </param>
4fc70e2
 #
4fc70e2
-interface(`httpd_man2html_script_manage_cache_dirs',`
4fc70e2
+interface(`man2html_manage_content_dirs',`
4fc70e2
 	gen_require(`
4fc70e2
-		type httpd_man2html_script_cache_t;
4fc70e2
+		type man2html_content_t;
4fc70e2
+		type man2html_rw_content_t;
4fc70e2
 	')
4fc70e2
 
4fc70e2
 	files_search_var($1)
4fc70e2
-	manage_dirs_pattern($1, httpd_man2html_script_cache_t, httpd_man2html_script_cache_t)
4fc70e2
+	manage_dirs_pattern($1, man2html_rw_content_t, man2html_rw_content_t)
4fc70e2
+	manage_dirs_pattern($1, man2html_content_t, man2html_content_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
-
4fc70e2
 ########################################
4fc70e2
 ## <summary>
4fc70e2
 ##	All of the rules required to administrate
4fc70e2
-##	an httpd_man2html_script environment
4fc70e2
+##	an man2html environment
4fc70e2
 ## </summary>
4fc70e2
 ## <param name="domain">
4fc70e2
 ##	<summary>
4fc70e2
@@ -108,17 +116,19 @@ interface(`httpd_man2html_script_manage_cache_dirs',`
4fc70e2
 ##	</summary>
4fc70e2
 ## </param>
4fc70e2
 #
4fc70e2
-interface(`httpd_man2html_script_admin',`
4fc70e2
+interface(`man2html_admin',`
4fc70e2
 	gen_require(`
4fc70e2
-		type httpd_man2html_script_t;
4fc70e2
-		type httpd_man2html_script_cache_t;
4fc70e2
+		type man2html_script_t;
4fc70e2
+		type man2html_rw_content_t;
4fc70e2
+		type man2html_content_t;
4fc70e2
 	')
4fc70e2
 
4fc70e2
-	allow $1 httpd_man2html_script_t:process { ptrace signal_perms };
4fc70e2
-	ps_process_pattern($1, httpd_man2html_script_t)
4fc70e2
+	allow $1 man2html_script_t:process { ptrace signal_perms };
4fc70e2
+	ps_process_pattern($1, man2html_script_t)
4fc70e2
 
4fc70e2
 	files_search_var($1)
4fc70e2
-	admin_pattern($1, httpd_man2html_script_cache_t)
4fc70e2
+	admin_pattern($1, man2html_content_t)
4fc70e2
+	admin_pattern($1, man2html_rw_content_t)
4fc70e2
 
4fc70e2
 	optional_policy(`
4fc70e2
 		systemd_passwd_agent_exec($1)
4fc70e2
diff --git a/man2html.te b/man2html.te
4fc70e2
index 9e634bd..24b56e9 100644
4fc70e2
--- a/man2html.te
4fc70e2
+++ b/man2html.te
4fc70e2
@@ -6,23 +6,17 @@ policy_module(man2html, 1.0.0)
4fc70e2
 #
4fc70e2
 
4fc70e2
 
4fc70e2
-type httpd_man2html_script_cache_t;
4fc70e2
-files_type(httpd_man2html_script_cache_t)
4fc70e2
-
4fc70e2
 ########################################
4fc70e2
 #
4fc70e2
-# httpd_man2html_script local policy
4fc70e2
+# man2html_script local policy
4fc70e2
 #
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
-
4fc70e2
 	apache_content_template(man2html)
4fc70e2
+	apache_content_alias_template(man2html, man2html)
4fc70e2
 
4fc70e2
-	allow httpd_man2html_script_t self:process { fork };
4fc70e2
-
4fc70e2
-	manage_dirs_pattern(httpd_man2html_script_t, httpd_man2html_script_cache_t, httpd_man2html_script_cache_t)
4fc70e2
-	manage_files_pattern(httpd_man2html_script_t, httpd_man2html_script_cache_t, httpd_man2html_script_cache_t)
4fc70e2
-	manage_lnk_files_pattern(httpd_man2html_script_t, httpd_man2html_script_cache_t, httpd_man2html_script_cache_t)
4fc70e2
-	files_var_filetrans(httpd_man2html_script_t, httpd_man2html_script_cache_t, { dir file })
4fc70e2
+	allow man2html_script_t self:process fork;
4fc70e2
 
4fc70e2
+	typealias man2html_rw_content_t alias man2html_script_cache_t;
4fc70e2
+	files_var_filetrans(man2html_script_t, man2html_rw_content_t, { dir file })
4fc70e2
 ')
4fc70e2
diff --git a/mediawiki.fc b/mediawiki.fc
4fc70e2
index 99f7c41..93ec6db 100644
4fc70e2
--- a/mediawiki.fc
4fc70e2
+++ b/mediawiki.fc
4fc70e2
@@ -1,8 +1,8 @@
4fc70e2
-/usr/lib/mediawiki/math/texvc	--	gen_context(system_u:object_r:httpd_mediawiki_script_exec_t,s0)
4fc70e2
-/usr/lib/mediawiki/math/texvc_tex	--	gen_context(system_u:object_r:httpd_mediawiki_script_exec_t,s0)
4fc70e2
-/usr/lib/mediawiki/math/texvc_tes	--	gen_context(system_u:object_r:httpd_mediawiki_script_exec_t,s0)
4fc70e2
+/usr/lib/mediawiki/math/texvc	--	gen_context(system_u:object_r:mediawiki_script_exec_t,s0)
4fc70e2
+/usr/lib/mediawiki/math/texvc_tex	--	gen_context(system_u:object_r:mediawiki_script_exec_t,s0)
4fc70e2
+/usr/lib/mediawiki/math/texvc_tes	--	gen_context(system_u:object_r:mediawiki_script_exec_t,s0)
4fc70e2
 
4fc70e2
-/usr/share/mediawiki(/.*)?	gen_context(system_u:object_r:httpd_mediawiki_content_t,s0)
4fc70e2
+/usr/share/mediawiki(/.*)?	gen_context(system_u:object_r:mediawiki_content_t,s0)
4fc70e2
 
4fc70e2
-/var/www/wiki(/.*)?	gen_context(system_u:object_r:httpd_mediawiki_rw_content_t,s0)
4fc70e2
-/var/www/wiki/.*\.php	--	gen_context(system_u:object_r:httpd_mediawiki_content_t,s0)
4fc70e2
+/var/www/wiki(/.*)?	gen_context(system_u:object_r:mediawiki_rw_content_t,s0)
4fc70e2
+/var/www/wiki/.*\.php	--	gen_context(system_u:object_r:mediawiki_content_t,s0)
4fc70e2
diff --git a/mediawiki.if b/mediawiki.if
4fc70e2
index 1c1d012..9b183e6 100644
4fc70e2
--- a/mediawiki.if
4fc70e2
+++ b/mediawiki.if
4fc70e2
@@ -13,12 +13,12 @@
4fc70e2
 #
4fc70e2
 interface(`mediawiki_read_tmp_files',`
4fc70e2
         gen_require(`
4fc70e2
-                type httpd_mediawiki_tmp_t;
4fc70e2
+                type mediawiki_tmp_t;
4fc70e2
         ')
4fc70e2
 
4fc70e2
         files_search_tmp($1)
4fc70e2
-        read_files_pattern($1, httpd_mediawiki_tmp_t, httpd_mediawiki_tmp_t)
4fc70e2
-	read_lnk_files_pattern($1, httpd_mediawiki_tmp_t, httpd_mediawiki_tmp_t)
4fc70e2
+        read_files_pattern($1, mediawiki_tmp_t, mediawiki_tmp_t)
4fc70e2
+	read_lnk_files_pattern($1, mediawiki_tmp_t, mediawiki_tmp_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 #######################################
4fc70e2
@@ -33,8 +33,8 @@ interface(`mediawiki_read_tmp_files',`
4fc70e2
 #
4fc70e2
 interface(`mediawiki_delete_tmp_files',`
4fc70e2
         gen_require(`
4fc70e2
-                type httpd_mediawiki_tmp_t;
4fc70e2
+                type mediawiki_tmp_t;
4fc70e2
         ')
4fc70e2
 
4fc70e2
-        delete_files_pattern($1, httpd_mediawiki_tmp_t, httpd_mediawiki_tmp_t)
4fc70e2
+        delete_files_pattern($1, mediawiki_tmp_t, mediawiki_tmp_t)
4fc70e2
 ')
4fc70e2
diff --git a/mediawiki.te b/mediawiki.te
4fc70e2
index 212712c..fcbc191 100644
4fc70e2
--- a/mediawiki.te
4fc70e2
+++ b/mediawiki.te
4fc70e2
@@ -5,16 +5,26 @@ policy_module(mediawiki, 1.0.0)
4fc70e2
 # Declarations
4fc70e2
 #
4fc70e2
 
4fc70e2
-optional_policy(`
4fc70e2
-
4fc70e2
-	apache_content_template(mediawiki)
4fc70e2
+type mediawiki_tmp_t;
4fc70e2
+files_tmp_file(mediawiki_tmp_t)
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
 #
4fc70e2
 # Local policy
4fc70e2
 #
4fc70e2
 
4fc70e2
-	files_search_var_lib(httpd_mediawiki_script_t)
4fc70e2
+optional_policy(`
4fc70e2
+
4fc70e2
+	apache_content_template(mediawiki)
4fc70e2
+	apache_content_alias_template(mediawiki, mediawiki)
4fc70e2
+
4fc70e2
+	manage_dirs_pattern(mediawiki_script_t, mediawiki_tmp_t, mediawiki_tmp_t)
4fc70e2
+	manage_files_pattern(mediawiki_script_t, mediawiki_tmp_t, mediawiki_tmp_t)
4fc70e2
+	manage_sock_files_pattern(mediawiki_script_t, mediawiki_tmp_t, mediawiki_tmp_t)
4fc70e2
+	manage_lnk_files_pattern(mediawiki_script_t, mediawiki_tmp_t, mediawiki_tmp_t)
4fc70e2
+	files_tmp_filetrans(mediawiki_script_t, mediawiki_tmp_t, { file dir lnk_file })
4fc70e2
+
4fc70e2
+	files_search_var_lib(mediawiki_script_t)
4fc70e2
 
4fc70e2
-	miscfiles_read_tetex_data(httpd_mediawiki_script_t)
4fc70e2
+	miscfiles_read_tetex_data(mediawiki_script_t)
4fc70e2
 ')
4fc70e2
diff --git a/mojomojo.fc b/mojomojo.fc
4fc70e2
index 7b827ca..5ee8a0f 100644
4fc70e2
--- a/mojomojo.fc
4fc70e2
+++ b/mojomojo.fc
4fc70e2
@@ -1,5 +1,5 @@
4fc70e2
-/usr/bin/mojomojo_fastcgi\.pl	--	gen_context(system_u:object_r:httpd_mojomojo_script_exec_t,s0)
4fc70e2
+/usr/bin/mojomojo_fastcgi\.pl	--	gen_context(system_u:object_r:mojomojo_script_exec_t,s0)
4fc70e2
 
4fc70e2
-/usr/share/mojomojo/root(/.*)?	gen_context(system_u:object_r:httpd_mojomojo_content_t,s0)
4fc70e2
+/usr/share/mojomojo/root(/.*)?	gen_context(system_u:object_r:mojomojo_content_t,s0)
4fc70e2
 
4fc70e2
-/var/lib/mojomojo(/.*)?	gen_context(system_u:object_r:httpd_mojomojo_rw_content_t,s0)
4fc70e2
+/var/lib/mojomojo(/.*)?	gen_context(system_u:object_r:mojomojo_rw_content_t,s0)
4fc70e2
diff --git a/mojomojo.te b/mojomojo.te
4fc70e2
index 9556487..25d1d33 100644
4fc70e2
--- a/mojomojo.te
4fc70e2
+++ b/mojomojo.te
4fc70e2
@@ -5,8 +5,8 @@ policy_module(mojomojo, 1.1.0)
4fc70e2
 # Declarations
4fc70e2
 #
4fc70e2
 
4fc70e2
-type httpd_mojomojo_tmp_t;
4fc70e2
-files_tmp_file(httpd_mojomojo_tmp_t)
4fc70e2
+type mojomojo_tmp_t alias httpd_mojomojo_tmp_t;
4fc70e2
+files_tmp_file(mojomojo_tmp_t)
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
 #
4fc70e2
@@ -15,31 +15,30 @@ files_tmp_file(httpd_mojomojo_tmp_t)
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
 	apache_content_template(mojomojo)
4fc70e2
+	apache_content_alias_template(mojomojo, mojomojo)
4fc70e2
 
4fc70e2
-	allow httpd_mojomojo_script_t httpd_t:unix_stream_socket rw_stream_socket_perms;
4fc70e2
+	manage_dirs_pattern(mojomojo_script_t, mojomojo_tmp_t, mojomojo_tmp_t)
4fc70e2
+	manage_files_pattern(mojomojo_script_t, mojomojo_tmp_t, mojomojo_tmp_t)
4fc70e2
+	files_tmp_filetrans(mojomojo_script_t, mojomojo_tmp_t, { file dir })
4fc70e2
 
4fc70e2
-	manage_dirs_pattern(httpd_mojomojo_script_t, httpd_mojomojo_tmp_t, httpd_mojomojo_tmp_t)
4fc70e2
-	manage_files_pattern(httpd_mojomojo_script_t, httpd_mojomojo_tmp_t, httpd_mojomojo_tmp_t)
4fc70e2
-	files_tmp_filetrans(httpd_mojomojo_script_t, httpd_mojomojo_tmp_t, { file dir })
4fc70e2
+	corenet_tcp_connect_postgresql_port(mojomojo_script_t)
4fc70e2
+	corenet_tcp_connect_mysqld_port(mojomojo_script_t)
4fc70e2
+	corenet_tcp_connect_smtp_port(mojomojo_script_t)
4fc70e2
+	corenet_sendrecv_postgresql_client_packets(mojomojo_script_t)
4fc70e2
+	corenet_sendrecv_mysqld_client_packets(mojomojo_script_t)
4fc70e2
+	corenet_sendrecv_smtp_client_packets(mojomojo_script_t)
4fc70e2
 
4fc70e2
-	corenet_tcp_connect_postgresql_port(httpd_mojomojo_script_t)
4fc70e2
-	corenet_tcp_connect_mysqld_port(httpd_mojomojo_script_t)
4fc70e2
-	corenet_tcp_connect_smtp_port(httpd_mojomojo_script_t)
4fc70e2
-	corenet_sendrecv_postgresql_client_packets(httpd_mojomojo_script_t)
4fc70e2
-	corenet_sendrecv_mysqld_client_packets(httpd_mojomojo_script_t)
4fc70e2
-	corenet_sendrecv_smtp_client_packets(httpd_mojomojo_script_t)
4fc70e2
+	files_search_var_lib(mojomojo_script_t)
4fc70e2
 
4fc70e2
-	files_search_var_lib(httpd_mojomojo_script_t)
4fc70e2
+	sysnet_dns_name_resolve(mojomojo_script_t)
4fc70e2
 
4fc70e2
-	sysnet_dns_name_resolve(httpd_mojomojo_script_t)
4fc70e2
-
4fc70e2
-	mta_send_mail(httpd_mojomojo_script_t)
4fc70e2
+	mta_send_mail(mojomojo_script_t)
4fc70e2
 
4fc70e2
 	optional_policy(`
4fc70e2
-		mysql_stream_connect(httpd_mojomojo_script_t)
4fc70e2
+		mysql_stream_connect(mojomojo_script_t)
4fc70e2
 	')
4fc70e2
 
4fc70e2
 	optional_policy(`
4fc70e2
-		postgresql_stream_connect(httpd_mojomojo_script_t)
4fc70e2
+		postgresql_stream_connect(mojomojo_script_t)
4fc70e2
 	')
4fc70e2
 ')
4fc70e2
diff --git a/munin.fc b/munin.fc
4fc70e2
index 4968324..af28bb5 100644
4fc70e2
--- a/munin.fc
4fc70e2
+++ b/munin.fc
4fc70e2
@@ -73,7 +73,7 @@
4fc70e2
 /var/lib/munin/plugin-state(/.*)?	gen_context(system_u:object_r:munin_plugin_state_t,s0)
4fc70e2
 /var/log/munin.*			gen_context(system_u:object_r:munin_log_t,s0)
4fc70e2
 /var/run/munin(/.*)?			gen_context(system_u:object_r:munin_var_run_t,s0)
4fc70e2
-/var/www/html/munin(/.*)?		gen_context(system_u:object_r:httpd_munin_content_t,s0)
4fc70e2
-/var/www/html/munin/cgi(/.*)?	gen_context(system_u:object_r:httpd_munin_script_exec_t,s0)
4fc70e2
-/var/www/html/cgi/munin.*       gen_context(system_u:object_r:httpd_munin_script_exec_t,s0)
4fc70e2
-/var/www/cgi-bin/munin.*		gen_context(system_u:object_r:httpd_munin_script_exec_t,s0)
4fc70e2
+/var/www/html/munin(/.*)?		gen_context(system_u:object_r:munin_content_t,s0)
4fc70e2
+/var/www/html/munin/cgi(/.*)?		gen_context(system_u:object_r:munin_script_exec_t,s0)
4fc70e2
+/var/www/html/cgi/munin.*       	gen_context(system_u:object_r:munin_script_exec_t,s0)
4fc70e2
+/var/www/cgi-bin/munin.*		gen_context(system_u:object_r:munin_script_exec_t,s0)
4fc70e2
diff --git a/munin.if b/munin.if
4fc70e2
index 4c1b6a8..900d083 100644
4fc70e2
--- a/munin.if
4fc70e2
+++ b/munin.if
4fc70e2
@@ -209,7 +209,7 @@ interface(`munin_admin',`
4fc70e2
 		attribute munin_plugin_domain, munin_plugin_tmp_content;
4fc70e2
 		type munin_t, munin_etc_t, munin_tmp_t;
4fc70e2
 		type munin_log_t, munin_var_lib_t, munin_var_run_t;
4fc70e2
-		type httpd_munin_content_t, munin_plugin_state_t, munin_initrc_exec_t;
4fc70e2
+		type munin_content_t, munin_plugin_state_t, munin_initrc_exec_t;
4fc70e2
 	')
4fc70e2
 
4fc70e2
 	allow $1 munin_t:process signal_perms;
4fc70e2
@@ -239,5 +239,5 @@ interface(`munin_admin',`
4fc70e2
 	files_list_pids($1)
4fc70e2
 	admin_pattern($1, munin_var_run_t)
4fc70e2
 
4fc70e2
-	admin_pattern($1, httpd_munin_content_t)
4fc70e2
+	admin_pattern($1, munin_content_t)
4fc70e2
 ')
4fc70e2
diff --git a/munin.te b/munin.te
4fc70e2
index cead88c..16b96d0 100644
4fc70e2
--- a/munin.te
4fc70e2
+++ b/munin.te
4fc70e2
@@ -44,8 +44,8 @@ files_tmpfs_file(services_munin_plugin_tmpfs_t)
4fc70e2
 munin_plugin_template(system)
4fc70e2
 munin_plugin_template(unconfined)
4fc70e2
 
4fc70e2
-type httpd_munin_script_tmp_t;
4fc70e2
-files_tmp_file(httpd_munin_script_tmp_t)
4fc70e2
+type munin_script_tmp_t alias httpd_munin_script_tmp_t;
4fc70e2
+files_tmp_file(munin_script_tmp_t)
4fc70e2
 
4fc70e2
 ################################
4fc70e2
 #
4fc70e2
@@ -435,22 +435,23 @@ optional_policy(`
4fc70e2
 #
4fc70e2
 
4fc70e2
 apache_content_template(munin)
4fc70e2
+apache_content_alias_template(munin, munin)
4fc70e2
 
4fc70e2
-manage_dirs_pattern(munin_t, httpd_munin_content_t, httpd_munin_content_t)
4fc70e2
-manage_files_pattern(munin_t, httpd_munin_content_t, httpd_munin_content_t)
4fc70e2
+manage_dirs_pattern(munin_t, munin_content_t, munin_content_t)
4fc70e2
+manage_files_pattern(munin_t, munin_content_t, munin_content_t)
4fc70e2
 
4fc70e2
-manage_dirs_pattern(httpd_munin_script_t, httpd_munin_script_tmp_t, httpd_munin_script_tmp_t)
4fc70e2
-manage_files_pattern(httpd_munin_script_t, httpd_munin_script_tmp_t,httpd_munin_script_tmp_t)
4fc70e2
+manage_dirs_pattern(munin_script_t, munin_script_tmp_t, munin_script_tmp_t)
4fc70e2
+manage_files_pattern(munin_script_t, munin_script_tmp_t,munin_script_tmp_t)
4fc70e2
 
4fc70e2
-read_files_pattern(httpd_munin_script_t, munin_var_lib_t, munin_var_lib_t)
4fc70e2
-read_files_pattern(httpd_munin_script_t, munin_etc_t, munin_etc_t)
4fc70e2
+read_files_pattern(munin_script_t, munin_var_lib_t, munin_var_lib_t)
4fc70e2
+read_files_pattern(munin_script_t, munin_etc_t, munin_etc_t)
4fc70e2
 
4fc70e2
-read_files_pattern(httpd_munin_script_t, munin_log_t, munin_log_t)
4fc70e2
-append_files_pattern(httpd_munin_script_t, munin_log_t, munin_log_t)
4fc70e2
+read_files_pattern(munin_script_t, munin_log_t, munin_log_t)
4fc70e2
+append_files_pattern(munin_script_t, munin_log_t, munin_log_t)
4fc70e2
 
4fc70e2
-files_search_var_lib(httpd_munin_script_t)
4fc70e2
+files_search_var_lib(munin_script_t)
4fc70e2
 
4fc70e2
-auth_read_passwd(httpd_munin_script_t)
4fc70e2
+auth_read_passwd(munin_script_t)
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
 	apache_search_sys_content(munin_t)
4fc70e2
diff --git a/mythtv.fc b/mythtv.fc
4fc70e2
index 3a1c423..d62cf88 100644
4fc70e2
--- a/mythtv.fc
4fc70e2
+++ b/mythtv.fc
4fc70e2
@@ -1,9 +1,9 @@
4fc70e2
-/usr/share/mythweb/mythweb\.pl	--	gen_context(system_u:object_r:httpd_mythtv_script_exec_t,s0)
4fc70e2
+/usr/share/mythweb/mythweb\.pl	--	gen_context(system_u:object_r:mythtv_script_exec_t,s0)
4fc70e2
 
4fc70e2
 /var/lib/mythtv(/.*)?	gen_context(system_u:object_r:mythtv_var_lib_t,s0)
4fc70e2
 
4fc70e2
 /var/log/mythtv(/.*)?	gen_context(system_u:object_r:mythtv_var_log_t,s0)
4fc70e2
 
4fc70e2
-/usr/share/mythtv(/.*)?		gen_context(system_u:object_r:httpd_mythtv_content_t,s0)
4fc70e2
-/usr/share/mythweb(/.*)?	gen_context(system_u:object_r:httpd_mythtv_content_t,s0)
4fc70e2
-/usr/share/mythtv/mythweather/scripts(/.*)? gen_context(system_u:object_r:httpd_mythtv_script_exec_t,s0)
4fc70e2
+/usr/share/mythtv(/.*)?		gen_context(system_u:object_r:mythtv_content_t,s0)
4fc70e2
+/usr/share/mythweb(/.*)?	gen_context(system_u:object_r:mythtv_content_t,s0)
4fc70e2
+/usr/share/mythtv/mythweather/scripts(/.*)? gen_context(system_u:object_r:mythtv_script_exec_t,s0)
4fc70e2
diff --git a/mythtv.if b/mythtv.if
4fc70e2
index 171f666..e2403dd 100644
4fc70e2
--- a/mythtv.if
4fc70e2
+++ b/mythtv.if
4fc70e2
@@ -1,9 +1,9 @@
4fc70e2
 
4fc70e2
-## <summary>policy for httpd_mythtv_script</summary>
4fc70e2
+## <summary>policy for mythtv_script</summary>
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
 ## <summary>
4fc70e2
-##	Execute TEMPLATE in the httpd_mythtv_script domin.
4fc70e2
+##	Execute TEMPLATE in the mythtv_script domin.
4fc70e2
 ## </summary>
4fc70e2
 ## <param name="domain">
4fc70e2
 ## <summary>
4fc70e2
@@ -11,13 +11,13 @@
4fc70e2
 ## </summary>
4fc70e2
 ## </param>
4fc70e2
 #
4fc70e2
-interface(`httpd_mythtv_script_domtrans',`
4fc70e2
+interface(`mythtv_script_domtrans',`
4fc70e2
 	gen_require(`
4fc70e2
-		type httpd_mythtv_script_t, httpd_mythtv_script_exec_t;
4fc70e2
+		type mythtv_script_t, mythtv_script_exec_t;
4fc70e2
 	')
4fc70e2
 
4fc70e2
 	corecmd_search_bin($1)
4fc70e2
-	domtrans_pattern($1, httpd_mythtv_script_exec_t, httpd_mythtv_script_t)
4fc70e2
+	domtrans_pattern($1, mythtv_script_exec_t, mythtv_script_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 #######################################
4fc70e2
@@ -133,15 +133,15 @@ interface(`mythtv_manage_log',`
4fc70e2
 #
4fc70e2
 interface(`mythtv_admin',`
4fc70e2
 	gen_require(`
4fc70e2
-		type httpd_mythtv_script_t, mythtv_var_lib_t;
4fc70e2
+		type mythtv_script_t, mythtv_var_lib_t;
4fc70e2
 		type mythtv_var_log_t;
4fc70e2
 	')
4fc70e2
 
4fc70e2
-	allow $1 httpd_mythtv_script_t:process signal_perms;
4fc70e2
-	ps_process_pattern($1, httpd_mythtv_script_t)
4fc70e2
+	allow $1 mythtv_script_t:process signal_perms;
4fc70e2
+	ps_process_pattern($1, mythtv_script_t)
4fc70e2
 
4fc70e2
 	tunable_policy(`deny_ptrace',`',`
4fc70e2
-		allow $1 httpd_mythtv_script_t:process ptrace;
4fc70e2
+		allow $1 mythtv_script_t:process ptrace;
4fc70e2
 	')
4fc70e2
 
4fc70e2
 	logging_list_logs($1)
4fc70e2
diff --git a/mythtv.te b/mythtv.te
4fc70e2
index 90129ac..7a4910c 100644
4fc70e2
--- a/mythtv.te
4fc70e2
+++ b/mythtv.te
4fc70e2
@@ -6,6 +6,7 @@ policy_module(mythtv, 1.0.0)
4fc70e2
 #
4fc70e2
 
4fc70e2
 apache_content_template(mythtv)
4fc70e2
+apache_content_alias_template(mythtv, mythtv)
4fc70e2
 
4fc70e2
 type mythtv_var_lib_t;
4fc70e2
 files_type(mythtv_var_lib_t)
4fc70e2
@@ -15,27 +16,27 @@ logging_log_file(mythtv_var_log_t)
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
 #
4fc70e2
-# httpd_mythtv_script local policy
4fc70e2
+# mythtv_script local policy
4fc70e2
 #
4fc70e2
 
4fc70e2
-manage_files_pattern(httpd_mythtv_script_t, mythtv_var_lib_t, mythtv_var_lib_t)
4fc70e2
-manage_dirs_pattern(httpd_mythtv_script_t, mythtv_var_lib_t, mythtv_var_lib_t)
4fc70e2
-files_var_lib_filetrans(httpd_mythtv_script_t, mythtv_var_lib_t, { dir file })
4fc70e2
+manage_files_pattern(mythtv_script_t, mythtv_var_lib_t, mythtv_var_lib_t)
4fc70e2
+manage_dirs_pattern(mythtv_script_t, mythtv_var_lib_t, mythtv_var_lib_t)
4fc70e2
+files_var_lib_filetrans(mythtv_script_t, mythtv_var_lib_t, { dir file })
4fc70e2
 
4fc70e2
-manage_files_pattern(httpd_mythtv_script_t, mythtv_var_log_t, mythtv_var_log_t)
4fc70e2
-manage_dirs_pattern(httpd_mythtv_script_t, mythtv_var_log_t, mythtv_var_log_t)
4fc70e2
-logging_log_filetrans(httpd_mythtv_script_t, mythtv_var_log_t, file )
4fc70e2
+manage_files_pattern(mythtv_script_t, mythtv_var_log_t, mythtv_var_log_t)
4fc70e2
+manage_dirs_pattern(mythtv_script_t, mythtv_var_log_t, mythtv_var_log_t)
4fc70e2
+logging_log_filetrans(mythtv_script_t, mythtv_var_log_t, file )
4fc70e2
 
4fc70e2
-domain_use_interactive_fds(httpd_mythtv_script_t)
4fc70e2
+domain_use_interactive_fds(mythtv_script_t)
4fc70e2
 
4fc70e2
-files_read_etc_files(httpd_mythtv_script_t)
4fc70e2
+files_read_etc_files(mythtv_script_t)
4fc70e2
 
4fc70e2
-fs_read_nfs_files(httpd_mythtv_script_t)
4fc70e2
+fs_read_nfs_files(mythtv_script_t)
4fc70e2
 
4fc70e2
-miscfiles_read_localization(httpd_mythtv_script_t)
4fc70e2
+miscfiles_read_localization(mythtv_script_t)
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
-	mysql_read_config(httpd_mythtv_script_t)
4fc70e2
-	mysql_stream_connect(httpd_mythtv_script_t)
4fc70e2
-	mysql_tcp_connect(httpd_mythtv_script_t)
4fc70e2
+	mysql_read_config(mythtv_script_t)
4fc70e2
+	mysql_stream_connect(mythtv_script_t)
4fc70e2
+	mysql_tcp_connect(mythtv_script_t)
4fc70e2
 ')
4fc70e2
diff --git a/nagios.fc b/nagios.fc
4fc70e2
index a00cc2d..24a2dec 100644
4fc70e2
--- a/nagios.fc
4fc70e2
+++ b/nagios.fc
4fc70e2
@@ -6,8 +6,8 @@
4fc70e2
 /usr/s?bin/nagios				--	gen_context(system_u:object_r:nagios_exec_t,s0)
4fc70e2
 /usr/s?bin/nrpe					--	gen_context(system_u:object_r:nrpe_exec_t,s0)
4fc70e2
 
4fc70e2
-/usr/lib/cgi-bin/netsaint(/.*)?			gen_context(system_u:object_r:httpd_nagios_script_exec_t,s0)
4fc70e2
-/usr/lib/nagios/cgi(/.*)?				gen_context(system_u:object_r:httpd_nagios_script_exec_t,s0)
4fc70e2
+/usr/lib/cgi-bin/netsaint(/.*)?			gen_context(system_u:object_r:nagios_script_exec_t,s0)
4fc70e2
+/usr/lib/nagios/cgi(/.*)?				gen_context(system_u:object_r:nagios_script_exec_t,s0)
4fc70e2
 
4fc70e2
 /var/log/nagios(/.*)?					gen_context(system_u:object_r:nagios_log_t,s0)
4fc70e2
 /var/log/netsaint(/.*)?					gen_context(system_u:object_r:nagios_log_t,s0)
4fc70e2
@@ -19,8 +19,8 @@
4fc70e2
 ifdef(`distro_debian',`
4fc70e2
 /usr/sbin/nagios				--	gen_context(system_u:object_r:nagios_exec_t,s0)
4fc70e2
 ')
4fc70e2
-/usr/lib/cgi-bin/nagios(/.+)?			gen_context(system_u:object_r:httpd_nagios_script_exec_t,s0)
4fc70e2
-/usr/lib/nagios/cgi-bin(/.*)?			gen_context(system_u:object_r:httpd_nagios_script_exec_t,s0)
4fc70e2
+/usr/lib/cgi-bin/nagios(/.+)?			gen_context(system_u:object_r:nagios_script_exec_t,s0)
4fc70e2
+/usr/lib/nagios/cgi-bin(/.*)?			gen_context(system_u:object_r:nagios_script_exec_t,s0)
4fc70e2
 
4fc70e2
 # admin plugins
4fc70e2
 /usr/lib/nagios/plugins/check_file_age	--	gen_context(system_u:object_r:nagios_admin_plugin_exec_t,s0)
4fc70e2
diff --git a/nagios.te b/nagios.te
4fc70e2
index f565a0e..1726e88 100644
4fc70e2
--- a/nagios.te
4fc70e2
+++ b/nagios.te
4fc70e2
@@ -186,33 +186,34 @@ optional_policy(`
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
 	apache_content_template(nagios)
4fc70e2
-	typealias httpd_nagios_script_t alias nagios_cgi_t;
4fc70e2
-	typealias httpd_nagios_script_exec_t alias nagios_cgi_exec_t;
4fc70e2
+	apache_content_alias_template(nagios, nagios)
4fc70e2
+	typealias nagios_script_t alias nagios_cgi_t;
4fc70e2
+	typealias nagios_script_exec_t alias nagios_cgi_exec_t;
4fc70e2
 
4fc70e2
-	allow httpd_nagios_script_t self:process signal_perms;
4fc70e2
+	allow nagios_script_t self:process signal_perms;
4fc70e2
 
4fc70e2
-	read_files_pattern(httpd_nagios_script_t, nagios_t, nagios_t)
4fc70e2
-	read_lnk_files_pattern(httpd_nagios_script_t, nagios_t, nagios_t)
4fc70e2
+	read_files_pattern(nagios_script_t, nagios_t, nagios_t)
4fc70e2
+	read_lnk_files_pattern(nagios_script_t, nagios_t, nagios_t)
4fc70e2
 
4fc70e2
-	allow httpd_nagios_script_t nagios_etc_t:dir list_dir_perms;
4fc70e2
-	allow httpd_nagios_script_t nagios_etc_t:file read_file_perms;
4fc70e2
-	allow httpd_nagios_script_t nagios_etc_t:lnk_file read_lnk_file_perms;
4fc70e2
+	allow nagios_script_t nagios_etc_t:dir list_dir_perms;
4fc70e2
+	allow nagios_script_t nagios_etc_t:file read_file_perms;
4fc70e2
+	allow nagios_script_t nagios_etc_t:lnk_file read_lnk_file_perms;
4fc70e2
 
4fc70e2
-	files_search_spool(httpd_nagios_script_t)
4fc70e2
-	rw_fifo_files_pattern(httpd_nagios_script_t, nagios_spool_t, nagios_spool_t)
4fc70e2
+	files_search_spool(nagios_script_t)
4fc70e2
+	rw_fifo_files_pattern(nagios_script_t, nagios_spool_t, nagios_spool_t)
4fc70e2
 
4fc70e2
-	allow httpd_nagios_script_t nagios_log_t:dir list_dir_perms;
4fc70e2
-	read_files_pattern(httpd_nagios_script_t, nagios_etc_t, nagios_log_t)
4fc70e2
-	read_lnk_files_pattern(httpd_nagios_script_t, nagios_etc_t, nagios_log_t)
4fc70e2
+	allow nagios_script_t nagios_log_t:dir list_dir_perms;
4fc70e2
+	read_files_pattern(nagios_script_t, nagios_etc_t, nagios_log_t)
4fc70e2
+	read_lnk_files_pattern(nagios_script_t, nagios_etc_t, nagios_log_t)
4fc70e2
 
4fc70e2
-	kernel_read_system_state(httpd_nagios_script_t)
4fc70e2
+	kernel_read_system_state(nagios_script_t)
4fc70e2
 
4fc70e2
-	domain_dontaudit_read_all_domains_state(httpd_nagios_script_t)
4fc70e2
+	domain_dontaudit_read_all_domains_state(nagios_script_t)
4fc70e2
 
4fc70e2
-	files_read_etc_runtime_files(httpd_nagios_script_t)
4fc70e2
-	files_read_kernel_symbol_table(httpd_nagios_script_t)
4fc70e2
+	files_read_etc_runtime_files(nagios_script_t)
4fc70e2
+	files_read_kernel_symbol_table(nagios_script_t)
4fc70e2
 
4fc70e2
-	logging_send_syslog_msg(httpd_nagios_script_t)
4fc70e2
+	logging_send_syslog_msg(nagios_script_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
diff --git a/nut.fc b/nut.fc
4fc70e2
index 41ff159..fac7d7b 100644
4fc70e2
--- a/nut.fc
4fc70e2
+++ b/nut.fc
4fc70e2
@@ -11,6 +11,6 @@
4fc70e2
 
4fc70e2
 /var/run/nut(/.*)?	gen_context(system_u:object_r:nut_var_run_t,s0)
4fc70e2
 
4fc70e2
-/var/www/nut-cgi-bin/upsimage\.cgi -- gen_context(system_u:object_r:httpd_nutups_cgi_script_exec_t,s0)
4fc70e2
-/var/www/nut-cgi-bin/upsset\.cgi -- gen_context(system_u:object_r:httpd_nutups_cgi_script_exec_t,s0)
4fc70e2
-/var/www/nut-cgi-bin/upsstats\.cgi -- gen_context(system_u:object_r:httpd_nutups_cgi_script_exec_t,s0)
4fc70e2
+/var/www/nut-cgi-bin/upsimage\.cgi -- gen_context(system_u:object_r:nutups_cgi_script_exec_t,s0)
4fc70e2
+/var/www/nut-cgi-bin/upsset\.cgi -- gen_context(system_u:object_r:nutups_cgi_script_exec_t,s0)
4fc70e2
+/var/www/nut-cgi-bin/upsstats\.cgi -- gen_context(system_u:object_r:nutups_cgi_script_exec_t,s0)
4fc70e2
diff --git a/nut.te b/nut.te
4fc70e2
index 1701352..249224e 100644
4fc70e2
--- a/nut.te
4fc70e2
+++ b/nut.te
4fc70e2
@@ -166,17 +166,18 @@ logging_send_syslog_msg(nut_upsdrvctl_t)
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
 	apache_content_template(nutups_cgi)
4fc70e2
+	apache_content_alias_template(nutups_cgi,nutups_cgi)
4fc70e2
 
4fc70e2
-	read_files_pattern(httpd_nutups_cgi_script_t, nut_conf_t, nut_conf_t)
4fc70e2
+	read_files_pattern(nutups_cgi_script_t, nut_conf_t, nut_conf_t)
4fc70e2
 
4fc70e2
-	corenet_all_recvfrom_netlabel(httpd_nutups_cgi_script_t)
4fc70e2
-	corenet_tcp_sendrecv_generic_if(httpd_nutups_cgi_script_t)
4fc70e2
-	corenet_tcp_sendrecv_generic_node(httpd_nutups_cgi_script_t)
4fc70e2
-	corenet_tcp_sendrecv_all_ports(httpd_nutups_cgi_script_t)
4fc70e2
-	corenet_tcp_connect_ups_port(httpd_nutups_cgi_script_t)
4fc70e2
-	corenet_udp_sendrecv_generic_if(httpd_nutups_cgi_script_t)
4fc70e2
-	corenet_udp_sendrecv_generic_node(httpd_nutups_cgi_script_t)
4fc70e2
-	corenet_udp_sendrecv_all_ports(httpd_nutups_cgi_script_t)
4fc70e2
+	corenet_all_recvfrom_netlabel(nutups_cgi_script_t)
4fc70e2
+	corenet_tcp_sendrecv_generic_if(nutups_cgi_script_t)
4fc70e2
+	corenet_tcp_sendrecv_generic_node(nutups_cgi_script_t)
4fc70e2
+	corenet_tcp_sendrecv_all_ports(nutups_cgi_script_t)
4fc70e2
+	corenet_tcp_connect_ups_port(nutups_cgi_script_t)
4fc70e2
+	corenet_udp_sendrecv_generic_if(nutups_cgi_script_t)
4fc70e2
+	corenet_udp_sendrecv_generic_node(nutups_cgi_script_t)
4fc70e2
+	corenet_udp_sendrecv_all_ports(nutups_cgi_script_t)
4fc70e2
 
4fc70e2
-	sysnet_dns_name_resolve(httpd_nutups_cgi_script_t)
4fc70e2
+	sysnet_dns_name_resolve(nutups_cgi_script_t)
4fc70e2
 ')
4fc70e2
diff --git a/openshift.fc b/openshift.fc
4fc70e2
index f2d6119..71ba1bd 100644
4fc70e2
--- a/openshift.fc
4fc70e2
+++ b/openshift.fc
4fc70e2
@@ -18,7 +18,7 @@
4fc70e2
 /usr/s?bin/(oo|rhc)-cgroup-read        --    gen_context(system_u:object_r:openshift_cgroup_read_exec_t,s0)
4fc70e2
 
4fc70e2
 /usr/s?bin/(oo|rhc)-restorer           --    gen_context(system_u:object_r:openshift_initrc_exec_t,s0)
4fc70e2
-/usr/s?bin/(oo|rhc)-restorer-wrapper.sh    --  gen_context(system_u:object_r:httpd_openshift_script_exec_t,s0)
4fc70e2
+/usr/s?bin/(oo|rhc)-restorer-wrapper.sh    --  gen_context(system_u:object_r:openshift_script_exec_t,s0)
4fc70e2
 /usr/s?bin/oo-admin-ctl-gears	--	gen_context(system_u:object_r:openshift_initrc_exec_t,s0)
4fc70e2
 /usr/s?bin/mcollectived			--		gen_context(system_u:object_r:openshift_initrc_exec_t,s0)
4fc70e2
 
4fc70e2
diff --git a/openshift.te b/openshift.te
4fc70e2
index cd25e8e..7965e82 100644
4fc70e2
--- a/openshift.te
4fc70e2
+++ b/openshift.te
4fc70e2
@@ -294,13 +294,14 @@ optional_policy(`
4fc70e2
 	# openshift cgi script policy
4fc70e2
 	#
4fc70e2
 	apache_content_template(openshift)
4fc70e2
-	domtrans_pattern(httpd_openshift_script_t, openshift_initrc_exec_t, openshift_initrc_t)
4fc70e2
+	apache_content_alias_template(openshift, openshift)
4fc70e2
+	domtrans_pattern(openshift_script_t, openshift_initrc_exec_t, openshift_initrc_t)
4fc70e2
 
4fc70e2
 	optional_policy(`
4fc70e2
-		dbus_system_bus_client(httpd_openshift_script_t)
4fc70e2
+		dbus_system_bus_client(openshift_script_t)
4fc70e2
 
4fc70e2
 		optional_policy(`
4fc70e2
-			oddjob_dbus_chat(httpd_openshift_script_t)
4fc70e2
+			oddjob_dbus_chat(openshift_script_t)
4fc70e2
 			oddjob_dontaudit_rw_fifo_file(openshift_domain)
4fc70e2
 		')
4fc70e2
 	')
4fc70e2
diff --git a/pki.if b/pki.if
4fc70e2
index b975b85..798efb6 100644
4fc70e2
--- a/pki.if
4fc70e2
+++ b/pki.if
4fc70e2
@@ -134,13 +134,6 @@ template(`pki_apache_template',`
4fc70e2
 
4fc70e2
 	# need to resolve addresses?
4fc70e2
 	auth_use_nsswitch($1_t)
4fc70e2
-
4fc70e2
-		#pki_apache_domain_signal(httpd_t)
4fc70e2
-		#pki_apache_domain_signal(httpd_t)
4fc70e2
-		#pki_manage_apache_run(httpd_t)
4fc70e2
-		#pki_manage_apache_config_files(httpd_t)
4fc70e2
-		#pki_manage_apache_log_files(httpd_t)
4fc70e2
-		#pki_manage_apache_lib(httpd_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 #######################################
4fc70e2
diff --git a/pki.te b/pki.te
4fc70e2
index 17f5d18..d656f71 100644
4fc70e2
--- a/pki.te
4fc70e2
+++ b/pki.te
4fc70e2
@@ -43,7 +43,6 @@ typealias pki_tomcat_etc_rw_t alias { pki_ca_etc_rw_t pki_kra_etc_rw_t pki_ocsp_
4fc70e2
 typealias pki_tomcat_var_lib_t alias { pki_ca_var_lib_t pki_kra_var_lib_t pki_ocsp_var_lib_t pki_tks_var_lib_t };
4fc70e2
 typealias pki_tomcat_var_run_t alias { pki_ca_var_run_t pki_kra_var_run_t pki_ocsp_var_run_t pki_tks_var_run_t };
4fc70e2
 typealias pki_tomcat_log_t alias { pki_ca_log_t pki_kra_log_t pki_ocsp_log_t pki_tks_log_t };
4fc70e2
-# typealias http_port_t alias { pki_ca_port_t pki_kra_port_t pki_ocsp_port_t pki_tks_port_t };
4fc70e2
 
4fc70e2
 
4fc70e2
 # pki policy types
4fc70e2
@@ -126,10 +125,6 @@ miscfiles_read_hwdata(pki_tomcat_t)
4fc70e2
 userdom_manage_user_tmp_dirs(pki_tomcat_t)
4fc70e2
 userdom_manage_user_tmp_files(pki_tomcat_t)
4fc70e2
 
4fc70e2
-# forward proxy
4fc70e2
-# need to define ports to fix this
4fc70e2
-#corenet_tcp_connect_pki_tomcat_port(httpd_t)
4fc70e2
-
4fc70e2
 # for crl publishing
4fc70e2
 allow pki_tomcat_t pki_tomcat_var_lib_t:lnk_file { rename create unlink };
4fc70e2
 
4fc70e2
@@ -166,9 +161,6 @@ corenet_tcp_connect_pki_tks_port(pki_tps_t)
4fc70e2
 
4fc70e2
 files_exec_usr_files(pki_tps_t)
4fc70e2
 
4fc70e2
-# why do I need to add this?
4fc70e2
-#allow httpd_t httpd_config_t:file execute;
4fc70e2
-
4fc70e2
 ######################################
4fc70e2
 #
4fc70e2
 # ra local policy
4fc70e2
@@ -268,13 +260,8 @@ optional_policy(`
4fc70e2
 	apache_list_modules(pki_apache_domain)
4fc70e2
 	apache_read_config(pki_apache_domain)
4fc70e2
 	apache_exec(pki_apache_domain)
4fc70e2
-    apache_exec_suexec(pki_apache_domain)
4fc70e2
+	apache_exec_suexec(pki_apache_domain)
4fc70e2
 	apache_entrypoint(pki_apache_domain)
4fc70e2
-
4fc70e2
-	# should be started using a script which will execute httpd
4fc70e2
-	# start up httpd in pki_apache_domain mode
4fc70e2
-	#can_exec(pki_apache_domain, httpd_config_t)
4fc70e2
-	#can_exec(pki_apache_domain, httpd_suexec_exec_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 # allow rpm -q in init scripts
4fc70e2
diff --git a/prelude.fc b/prelude.fc
4fc70e2
index 8dbc763..b580f85 100644
4fc70e2
--- a/prelude.fc
4fc70e2
+++ b/prelude.fc
4fc70e2
@@ -12,7 +12,7 @@
4fc70e2
 
4fc70e2
 /usr/sbin/audisp-prelude	--	gen_context(system_u:object_r:prelude_audisp_exec_t,s0)
4fc70e2
 
4fc70e2
-/usr/share/prewikka/cgi-bin(/.*)?	gen_context(system_u:object_r:httpd_prewikka_script_exec_t,s0)
4fc70e2
+/usr/share/prewikka/cgi-bin(/.*)?	gen_context(system_u:object_r:prewikka_script_exec_t,s0)
4fc70e2
 
4fc70e2
 /var/lib/prelude-lml(/.*)?	gen_context(system_u:object_r:prelude_var_lib_t,s0)
4fc70e2
 
4fc70e2
diff --git a/prelude.te b/prelude.te
4fc70e2
index 509fd0a..e1f4f70 100644
4fc70e2
--- a/prelude.te
4fc70e2
+++ b/prelude.te
4fc70e2
@@ -265,27 +265,28 @@ optional_policy(`
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
 	apache_content_template(prewikka)
4fc70e2
+	apache_content_alias_template(prewikka, prewikka)
4fc70e2
 
4fc70e2
-	can_exec(httpd_prewikka_script_t, httpd_prewikka_script_exec_t)
4fc70e2
+	can_exec(prewikka_script_t, prewikka_script_exec_t)
4fc70e2
 
4fc70e2
-	files_search_tmp(httpd_prewikka_script_t)
4fc70e2
+	files_search_tmp(prewikka_script_t)
4fc70e2
 
4fc70e2
-	kernel_read_sysctl(httpd_prewikka_script_t)
4fc70e2
-	kernel_search_network_sysctl(httpd_prewikka_script_t)
4fc70e2
+	kernel_read_sysctl(prewikka_script_t)
4fc70e2
+	kernel_search_network_sysctl(prewikka_script_t)
4fc70e2
 
4fc70e2
-	auth_use_nsswitch(httpd_prewikka_script_t)
4fc70e2
+	auth_use_nsswitch(prewikka_script_t)
4fc70e2
 
4fc70e2
-	logging_send_syslog_msg(httpd_prewikka_script_t)
4fc70e2
+	logging_send_syslog_msg(prewikka_script_t)
4fc70e2
 
4fc70e2
-	apache_search_sys_content(httpd_prewikka_script_t)
4fc70e2
+	apache_search_sys_content(prewikka_script_t)
4fc70e2
 
4fc70e2
 	optional_policy(`
4fc70e2
-		mysql_stream_connect(httpd_prewikka_script_t)
4fc70e2
-		mysql_tcp_connect(httpd_prewikka_script_t)
4fc70e2
+		mysql_stream_connect(prewikka_script_t)
4fc70e2
+		mysql_tcp_connect(prewikka_script_t)
4fc70e2
 	')
4fc70e2
 
4fc70e2
 	optional_policy(`
4fc70e2
-		postgresql_stream_connect(httpd_prewikka_script_t)
4fc70e2
-		postgresql_tcp_connect(httpd_prewikka_script_t)
4fc70e2
+		postgresql_stream_connect(prewikka_script_t)
4fc70e2
+		postgresql_tcp_connect(prewikka_script_t)
4fc70e2
 	')
4fc70e2
 ')
4fc70e2
diff --git a/smokeping.fc b/smokeping.fc
4fc70e2
index 3359819..a231ecb 100644
4fc70e2
--- a/smokeping.fc
4fc70e2
+++ b/smokeping.fc
4fc70e2
@@ -2,7 +2,7 @@
4fc70e2
 
4fc70e2
 /usr/sbin/smokeping	--	gen_context(system_u:object_r:smokeping_exec_t,s0)
4fc70e2
 
4fc70e2
-/usr/share/smokeping/cgi(/.*)?	gen_context(system_u:object_r:httpd_smokeping_cgi_script_exec_t,s0)
4fc70e2
+/usr/share/smokeping/cgi(/.*)?	gen_context(system_u:object_r:smokeping_cgi_script_exec_t,s0)
4fc70e2
 
4fc70e2
 /var/lib/smokeping(/.*)?	gen_context(system_u:object_r:smokeping_var_lib_t,s0)
4fc70e2
 
4fc70e2
diff --git a/smokeping.te b/smokeping.te
4fc70e2
index ebf575f..26b6da1 100644
4fc70e2
--- a/smokeping.te
4fc70e2
+++ b/smokeping.te
4fc70e2
@@ -58,19 +58,20 @@ netutils_domtrans_ping(smokeping_t)
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
 	apache_content_template(smokeping_cgi)
4fc70e2
+	apache_content_alias_template(smokeping_cgi, smokeping_cgi)
4fc70e2
 
4fc70e2
-	manage_dirs_pattern(httpd_smokeping_cgi_script_t, smokeping_var_lib_t, smokeping_var_lib_t)
4fc70e2
-	manage_files_pattern(httpd_smokeping_cgi_script_t, smokeping_var_lib_t, smokeping_var_lib_t)
4fc70e2
+	manage_dirs_pattern(smokeping_cgi_script_t, smokeping_var_lib_t, smokeping_var_lib_t)
4fc70e2
+	manage_files_pattern(smokeping_cgi_script_t, smokeping_var_lib_t, smokeping_var_lib_t)
4fc70e2
 
4fc70e2
-	getattr_files_pattern(httpd_smokeping_cgi_script_t, smokeping_var_run_t, smokeping_var_run_t)
4fc70e2
+	getattr_files_pattern(smokeping_cgi_script_t, smokeping_var_run_t, smokeping_var_run_t)
4fc70e2
 
4fc70e2
-	files_read_etc_files(httpd_smokeping_cgi_script_t)
4fc70e2
-	files_search_tmp(httpd_smokeping_cgi_script_t)
4fc70e2
-	files_search_var_lib(httpd_smokeping_cgi_script_t)
4fc70e2
+	files_read_etc_files(smokeping_cgi_script_t)
4fc70e2
+	files_search_tmp(smokeping_cgi_script_t)
4fc70e2
+	files_search_var_lib(smokeping_cgi_script_t)
4fc70e2
 
4fc70e2
-	auth_read_passwd(httpd_smokeping_cgi_script_t)
4fc70e2
+	auth_read_passwd(smokeping_cgi_script_t)
4fc70e2
 
4fc70e2
-	sysnet_dns_name_resolve(httpd_smokeping_cgi_script_t)
4fc70e2
+	sysnet_dns_name_resolve(smokeping_cgi_script_t)
4fc70e2
 
4fc70e2
-	netutils_domtrans_ping(httpd_smokeping_cgi_script_t)
4fc70e2
+	netutils_domtrans_ping(smokeping_cgi_script_t)
4fc70e2
 ')
4fc70e2
diff --git a/squid.fc b/squid.fc
4fc70e2
index ebbec17..5b066d3 100644
4fc70e2
--- a/squid.fc
4fc70e2
+++ b/squid.fc
4fc70e2
@@ -2,14 +2,14 @@
4fc70e2
 /etc/squid(/.*)?		gen_context(system_u:object_r:squid_conf_t,s0)
4fc70e2
 /etc/lightsquid(/.*)?		gen_context(system_u:object_r:squid_conf_t,s0)
4fc70e2
 
4fc70e2
-/usr/lib/squid/cachemgr\.cgi	--	gen_context(system_u:object_r:httpd_squid_script_exec_t,s0)
4fc70e2
+/usr/lib/squid/cachemgr\.cgi	--	gen_context(system_u:object_r:squid_script_exec_t,s0)
4fc70e2
 
4fc70e2
 /usr/sbin/lightparser.pl --	gen_context(system_u:object_r:squid_cron_exec_t,s0)
4fc70e2
 
4fc70e2
 /usr/sbin/squid	--	gen_context(system_u:object_r:squid_exec_t,s0)
4fc70e2
 
4fc70e2
 /usr/share/squid(/.*)?	gen_context(system_u:object_r:squid_conf_t,s0)
4fc70e2
-/usr/share/lightsquid/cgi(/.*)? gen_context(system_u:object_r:httpd_squid_script_exec_t,s0)
4fc70e2
+/usr/share/lightsquid/cgi(/.*)? gen_context(system_u:object_r:squid_script_exec_t,s0)
4fc70e2
 
4fc70e2
 /var/cache/squid(/.*)?	gen_context(system_u:object_r:squid_cache_t,s0)
4fc70e2
 
4fc70e2
diff --git a/squid.te b/squid.te
4fc70e2
index 7cb8bec..4ade5f1 100644
4fc70e2
--- a/squid.te
4fc70e2
+++ b/squid.te
4fc70e2
@@ -201,24 +201,25 @@ tunable_policy(`squid_use_tproxy',`
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
 	apache_content_template(squid)
4fc70e2
+	apache_content_alias_template(squid, squid)
4fc70e2
 
4fc70e2
-	allow httpd_squid_script_t self:tcp_socket create_socket_perms;
4fc70e2
+	allow squid_script_t self:tcp_socket create_socket_perms;
4fc70e2
 
4fc70e2
-	corenet_all_recvfrom_unlabeled(httpd_squid_script_t)
4fc70e2
-	corenet_all_recvfrom_netlabel(httpd_squid_script_t)
4fc70e2
-	corenet_tcp_sendrecv_generic_if(httpd_squid_script_t)
4fc70e2
-	corenet_tcp_sendrecv_generic_node(httpd_squid_script_t)
4fc70e2
+	corenet_all_recvfrom_unlabeled(squid_script_t)
4fc70e2
+	corenet_all_recvfrom_netlabel(squid_script_t)
4fc70e2
+	corenet_tcp_sendrecv_generic_if(squid_script_t)
4fc70e2
+	corenet_tcp_sendrecv_generic_node(squid_script_t)
4fc70e2
 
4fc70e2
-	corenet_sendrecv_http_cache_client_packets(httpd_squid_script_t)
4fc70e2
-	corenet_tcp_connect_http_cache_port(httpd_squid_script_t)
4fc70e2
-	corenet_tcp_sendrecv_http_cache_port(httpd_squid_script_t)
4fc70e2
+	corenet_sendrecv_http_cache_client_packets(squid_script_t)
4fc70e2
+	corenet_tcp_connect_http_cache_port(squid_script_t)
4fc70e2
+	corenet_tcp_sendrecv_http_cache_port(squid_script_t)
4fc70e2
 
4fc70e2
-	corenet_tcp_connect_squid_port(httpd_squid_script_t)
4fc70e2
+	corenet_tcp_connect_squid_port(squid_script_t)
4fc70e2
 
4fc70e2
-	sysnet_dns_name_resolve(httpd_squid_script_t)
4fc70e2
+	sysnet_dns_name_resolve(squid_script_t)
4fc70e2
 
4fc70e2
 	optional_policy(`
4fc70e2
-		squid_read_config(httpd_squid_script_t)
4fc70e2
+		squid_read_config(squid_script_t)
4fc70e2
 	')
4fc70e2
 ')
4fc70e2
 
4fc70e2
diff --git a/w3c.fc b/w3c.fc
4fc70e2
index 463c799..227feaf 100644
4fc70e2
--- a/w3c.fc
4fc70e2
+++ b/w3c.fc
4fc70e2
@@ -1,4 +1,4 @@
4fc70e2
-/usr/lib/cgi-bin/check	--	gen_context(system_u:object_r:httpd_w3c_validator_script_exec_t,s0)
4fc70e2
+/usr/lib/cgi-bin/check	--	gen_context(system_u:object_r:w3c_validator_script_exec_t,s0)
4fc70e2
 
4fc70e2
-/usr/share/w3c-markup-validator(/.*)?	gen_context(system_u:object_r:httpd_w3c_validator_content_t,s0)
4fc70e2
-/usr/share/w3c-markup-validator/cgi-bin(/.*)?	gen_context(system_u:object_r:httpd_w3c_validator_script_exec_t,s0)
4fc70e2
+/usr/share/w3c-markup-validator(/.*)?	gen_context(system_u:object_r:w3c_validator_content_t,s0)
4fc70e2
+/usr/share/w3c-markup-validator/cgi-bin(/.*)?	gen_context(system_u:object_r:w3c_validator_script_exec_t,s0)
4fc70e2
diff --git a/w3c.te b/w3c.te
4fc70e2
index b14d6a9..ac1944e 100644
4fc70e2
--- a/w3c.te
4fc70e2
+++ b/w3c.te
4fc70e2
@@ -6,29 +6,30 @@ policy_module(w3c, 1.1.0)
4fc70e2
 #
4fc70e2
 
4fc70e2
 apache_content_template(w3c_validator)
4fc70e2
+apache_content_alias_template(w3c_validator, w3c_validator)
4fc70e2
 
4fc70e2
 ########################################
4fc70e2
 #
4fc70e2
 # Local policy
4fc70e2
 #
4fc70e2
 
4fc70e2
-corenet_all_recvfrom_unlabeled(httpd_w3c_validator_script_t)
4fc70e2
-corenet_all_recvfrom_netlabel(httpd_w3c_validator_script_t)
4fc70e2
-corenet_tcp_sendrecv_generic_if(httpd_w3c_validator_script_t)
4fc70e2
-corenet_tcp_sendrecv_generic_node(httpd_w3c_validator_script_t)
4fc70e2
+corenet_all_recvfrom_unlabeled(w3c_validator_script_t)
4fc70e2
+corenet_all_recvfrom_netlabel(w3c_validator_script_t)
4fc70e2
+corenet_tcp_sendrecv_generic_if(w3c_validator_script_t)
4fc70e2
+corenet_tcp_sendrecv_generic_node(w3c_validator_script_t)
4fc70e2
 
4fc70e2
-corenet_sendrecv_ftp_client_packets(httpd_w3c_validator_script_t)
4fc70e2
-corenet_tcp_connect_ftp_port(httpd_w3c_validator_script_t)
4fc70e2
-corenet_tcp_sendrecv_ftp_port(httpd_w3c_validator_script_t)
4fc70e2
+corenet_sendrecv_ftp_client_packets(w3c_validator_script_t)
4fc70e2
+corenet_tcp_connect_ftp_port(w3c_validator_script_t)
4fc70e2
+corenet_tcp_sendrecv_ftp_port(w3c_validator_script_t)
4fc70e2
 
4fc70e2
-corenet_sendrecv_http_client_packets(httpd_w3c_validator_script_t)
4fc70e2
-corenet_tcp_connect_http_port(httpd_w3c_validator_script_t)
4fc70e2
-corenet_tcp_sendrecv_http_port(httpd_w3c_validator_script_t)
4fc70e2
+corenet_sendrecv_http_client_packets(w3c_validator_script_t)
4fc70e2
+corenet_tcp_connect_http_port(w3c_validator_script_t)
4fc70e2
+corenet_tcp_sendrecv_http_port(w3c_validator_script_t)
4fc70e2
 
4fc70e2
-corenet_sendrecv_http_cache_client_packets(httpd_w3c_validator_script_t)
4fc70e2
-corenet_tcp_connect_http_cache_port(httpd_w3c_validator_script_t)
4fc70e2
-corenet_tcp_sendrecv_http_cache_port(httpd_w3c_validator_script_t)
4fc70e2
+corenet_sendrecv_http_cache_client_packets(w3c_validator_script_t)
4fc70e2
+corenet_tcp_connect_http_cache_port(w3c_validator_script_t)
4fc70e2
+corenet_tcp_sendrecv_http_cache_port(w3c_validator_script_t)
4fc70e2
 
4fc70e2
-miscfiles_read_generic_certs(httpd_w3c_validator_script_t)
4fc70e2
+miscfiles_read_generic_certs(w3c_validator_script_t)
4fc70e2
 
4fc70e2
-sysnet_dns_name_resolve(httpd_w3c_validator_script_t)
4fc70e2
+sysnet_dns_name_resolve(w3c_validator_script_t)
4fc70e2
diff --git a/webalizer.fc b/webalizer.fc
4fc70e2
index 64baf67..76c753b 100644
4fc70e2
--- a/webalizer.fc
4fc70e2
+++ b/webalizer.fc
4fc70e2
@@ -6,4 +6,4 @@
4fc70e2
 
4fc70e2
 /var/lib/webalizer(/.*)?	gen_context(system_u:object_r:webalizer_var_lib_t,s0)
4fc70e2
 
4fc70e2
-/var/www/usage(/.*)?	gen_context(system_u:object_r:httpd_webalizer_content_t,s0)
4fc70e2
+/var/www/usage(/.*)?	gen_context(system_u:object_r:webalizer_rw_content_t,s0)
4fc70e2
diff --git a/webalizer.te b/webalizer.te
4fc70e2
index e0b1983..32cbf8c 100644
4fc70e2
--- a/webalizer.te
4fc70e2
+++ b/webalizer.te
4fc70e2
@@ -83,9 +83,8 @@ userdom_dontaudit_search_user_home_content(webalizer_t)
4fc70e2
 optional_policy(`
4fc70e2
 	apache_read_log(webalizer_t)
4fc70e2
 	apache_content_template(webalizer)
4fc70e2
+	apache_content_alias_template(webalizer, webalizer)
4fc70e2
 	apache_manage_sys_content(webalizer_t)
4fc70e2
-	manage_dirs_pattern(webalizer_t, httpd_webalizer_content_t, httpd_webalizer_content_t)
4fc70e2
-	manage_files_pattern(webalizer_t, httpd_webalizer_content_t, httpd_webalizer_content_t)
4fc70e2
 ')
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
diff --git a/zoneminder.fc b/zoneminder.fc
4fc70e2
index 8c61505..ceaa219 100644
4fc70e2
--- a/zoneminder.fc
4fc70e2
+++ b/zoneminder.fc
4fc70e2
@@ -4,7 +4,7 @@
4fc70e2
 
4fc70e2
 /usr/lib/systemd/system/zoneminder.* --  gen_context(system_u:object_r:zoneminder_unit_file_t,s0)
4fc70e2
 
4fc70e2
-/usr/libexec/zoneminder/cgi-bin(/.*)? 	gen_context(system_u:object_r:httpd_zoneminder_script_exec_t,s0)
4fc70e2
+/usr/libexec/zoneminder/cgi-bin(/.*)? 	gen_context(system_u:object_r:zoneminder_script_exec_t,s0)
4fc70e2
 
4fc70e2
 /var/lib/zoneminder(/.*)?		gen_context(system_u:object_r:zoneminder_var_lib_t,s0)
4fc70e2
 
4fc70e2
diff --git a/zoneminder.te b/zoneminder.te
4fc70e2
index add28f7..b66e76d 100644
4fc70e2
--- a/zoneminder.te
4fc70e2
+++ b/zoneminder.te
4fc70e2
@@ -164,24 +164,24 @@ optional_policy(`
4fc70e2
 
4fc70e2
 optional_policy(`
4fc70e2
 	apache_content_template(zoneminder)
4fc70e2
+	apache_content_alias_template(zoneminder, zoneminder)
4fc70e2
 
4fc70e2
 	# need more testing
4fc70e2
-	#allow httpd_zoneminder_script_t self:shm create_shm_perms;
4fc70e2
+	#allow zoneminder_script_t self:shm create_shm_perms;
4fc70e2
 
4fc70e2
-	manage_sock_files_pattern(httpd_zoneminder_script_t, zoneminder_var_lib_t, zoneminder_var_lib_t)
4fc70e2
+	manage_sock_files_pattern(zoneminder_script_t, zoneminder_var_lib_t, zoneminder_var_lib_t)
4fc70e2
 
4fc70e2
-    rw_files_pattern(httpd_zoneminder_script_t, zoneminder_tmpfs_t, zoneminder_tmpfs_t)
4fc70e2
+    rw_files_pattern(zoneminder_script_t, zoneminder_tmpfs_t, zoneminder_tmpfs_t)
4fc70e2
 
4fc70e2
-	zoneminder_stream_connect(httpd_zoneminder_script_t)
4fc70e2
+	zoneminder_stream_connect(zoneminder_script_t)
4fc70e2
 
4fc70e2
-    can_exec(zoneminder_t, httpd_zoneminder_script_exec_t)
4fc70e2
+    can_exec(zoneminder_t, zoneminder_script_exec_t)
4fc70e2
 	
4fc70e2
-	files_search_var_lib(httpd_zoneminder_script_t)
4fc70e2
+	files_search_var_lib(zoneminder_script_t)
4fc70e2
 
4fc70e2
-	logging_send_syslog_msg(httpd_zoneminder_script_t)
4fc70e2
+	logging_send_syslog_msg(zoneminder_script_t)
4fc70e2
 
4fc70e2
 	optional_policy(`
4fc70e2
-	    	mysql_stream_connect(httpd_zoneminder_script_t)
4fc70e2
+	    	mysql_stream_connect(zoneminder_script_t)
4fc70e2
 	')
4fc70e2
-
4fc70e2
 ')