########################################
## <summary>
##	Read apache system read/write content.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access.
##	</summary>
## </param>
#
interface(`apache_read_sys_content_rw',`
	gen_require(`
		type httpd_sys_content_rw_t;
	')

	allow $1 httpd_sys_content_rw_t:dir list_dir_perms;
	read_files_pattern($1, httpd_sys_content_rw_t, httpd_sys_content_rw_t)
	read_lnk_files_pattern($1, httpd_sys_content_rw_t, httpd_sys_content_rw_t)
')

########################################
## <summary>
##      Do not audit attempts to read and write Apache
##      system read/write content files.
## </summary>
## <param name="domain">
##      <summary>
##      Domain allowed access.
##      </summary>
## </param>
#
interface(`apache_dontaudit_rw_sys_content_rw_files',`
	gen_require(`
		type httpd_sys_content_rw_t;
	')

	dontaudit $1 httpd_sys_content_rw_t:file { read write };
')
