Chris PeBenito 967fd1
## <summary>high-performance memory object caching system</summary>
Chris PeBenito 967fd1
Chris PeBenito 967fd1
########################################
Chris PeBenito 967fd1
## <summary>
Chris PeBenito 967fd1
##	Execute a domain transition to run memcached.
Chris PeBenito 967fd1
## </summary>
Chris PeBenito 967fd1
## <param name="domain">
Chris PeBenito 967fd1
## <summary>
Chris PeBenito 967fd1
##	Domain allowed to transition.
Chris PeBenito 967fd1
## </summary>
Chris PeBenito 967fd1
## </param>
Chris PeBenito 967fd1
#
Chris PeBenito 967fd1
interface(`memcached_domtrans',`
Chris PeBenito 967fd1
	gen_require(`
Chris PeBenito 967fd1
		type memcached_t;
Chris PeBenito 6073ea
		type memcached_exec_t;
Chris PeBenito 967fd1
	')
Chris PeBenito 967fd1
Chris PeBenito 967fd1
	domtrans_pattern($1,memcached_exec_t,memcached_t)
Chris PeBenito 967fd1
')
Chris PeBenito 967fd1
Chris PeBenito 967fd1
########################################
Chris PeBenito 967fd1
## <summary>
Chris PeBenito 967fd1
##	Read memcached PID files.
Chris PeBenito 967fd1
## </summary>
Chris PeBenito 967fd1
## <param name="domain">
Chris PeBenito 967fd1
##	<summary>
Chris PeBenito 967fd1
##	Domain allowed access.
Chris PeBenito 967fd1
##	</summary>
Chris PeBenito 967fd1
## </param>
Chris PeBenito 967fd1
#
Chris PeBenito 967fd1
interface(`memcached_read_pid_files',`
Chris PeBenito 967fd1
	gen_require(`
Chris PeBenito 967fd1
		type memcached_var_run_t;
Chris PeBenito 967fd1
	')
Chris PeBenito 967fd1
Chris PeBenito 967fd1
	files_search_pids($1)
Chris PeBenito 967fd1
	allow $1 memcached_var_run_t:file read_file_perms;
Chris PeBenito 967fd1
')
Chris PeBenito 967fd1
Chris PeBenito 967fd1
########################################
Chris PeBenito 967fd1
## <summary>
Chris PeBenito 967fd1
##	All of the rules required to administrate 
Chris PeBenito 967fd1
##	an memcached environment
Chris PeBenito 967fd1
## </summary>
Chris PeBenito 967fd1
## <param name="domain">
Chris PeBenito 967fd1
##	<summary>
Chris PeBenito 967fd1
##	Domain allowed access.
Chris PeBenito 967fd1
##	</summary>
Chris PeBenito 967fd1
## </param>
Chris PeBenito 967fd1
## <param name="role">
Chris PeBenito 967fd1
##	<summary>
Chris PeBenito 967fd1
##	The role to be allowed to manage the memcached domain.
Chris PeBenito 967fd1
##	</summary>
Chris PeBenito 967fd1
## </param>
Chris PeBenito 967fd1
## <rolecap/>
Chris PeBenito 967fd1
#
Chris PeBenito 967fd1
interface(`memcached_admin',`
Chris PeBenito 967fd1
	gen_require(`
Chris PeBenito 967fd1
		type memcached_t;
Chris PeBenito 967fd1
		type memcached_initrc_exec_t;
Chris PeBenito 967fd1
	')
Chris PeBenito 967fd1
Chris PeBenito 967fd1
	allow $1 memcached_t:process { ptrace signal_perms };
Chris PeBenito 967fd1
	ps_process_pattern($1, memcached_t)
Chris PeBenito 967fd1
Chris PeBenito 967fd1
	init_labeled_script_domtrans($1, memcached_initrc_exec_t)
Chris PeBenito 967fd1
	domain_system_change_exemption($1)
Chris PeBenito 967fd1
	role_transition $2 memcached_initrc_exec_t system_r;
Chris PeBenito 967fd1
	allow $2 system_r;
Chris PeBenito 967fd1
Chris PeBenito 967fd1
	admin_pattern($1, memcached_var_run_t)
Chris PeBenito 967fd1
')