Chris PeBenito 17de1b
## <summary>Smart disk monitoring daemon policy</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow caller to read smartmon temporary files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The process type reading the temporary files.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`smartmon_read_tmp_files',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type fsdaemon_tmp_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 82d277
	allow $1 fsdaemon_tmp_t:file read_file_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 7a5e2d
Chris PeBenito 7a5e2d
########################################
Chris PeBenito 7a5e2d
## <summary>
Chris PeBenito 7a5e2d
##	All of the rules required to administrate 
Chris PeBenito 7a5e2d
##	an smartmon environment
Chris PeBenito 7a5e2d
## </summary>
Chris PeBenito 7a5e2d
## <param name="domain">
Chris PeBenito 7a5e2d
##	<summary>
Chris PeBenito 7a5e2d
##	Domain allowed access.
Chris PeBenito 7a5e2d
##	</summary>
Chris PeBenito 7a5e2d
## </param>
Chris PeBenito 967fd1
## <param name="role">
Chris PeBenito 967fd1
##	<summary>
Chris PeBenito 967fd1
##	Role allowed access.
Chris PeBenito 967fd1
##	</summary>
Chris PeBenito 967fd1
## </param>
Chris PeBenito 7a5e2d
## <rolecap/>
Chris PeBenito 7a5e2d
#
Chris PeBenito 7a5e2d
interface(`smartmon_admin',`
Chris PeBenito 7a5e2d
	gen_require(`
Chris PeBenito b34db7
		type fsdaemon_t, fsdaemon_tmp_t, fsdaemon_var_run_t;
Chris PeBenito 967fd1
		type fsdaemon_initrc_exec_t;
Chris PeBenito 7a5e2d
	')
Chris PeBenito 7a5e2d
Chris PeBenito b34db7
	allow $1 fsdaemon_t:process { ptrace signal_perms getattr };
Chris PeBenito b34db7
	ps_process_pattern($1, fsdaemon_t)
Chris PeBenito 967fd1
Chris PeBenito 967fd1
	init_labeled_script_domtrans($1, fsdaemon_initrc_exec_t)
Chris PeBenito 967fd1
	domain_system_change_exemption($1)
Chris PeBenito 967fd1
	role_transition $2 fsdaemon_initrc_exec_t system_r;
Chris PeBenito 967fd1
	allow $2 system_r;
Chris PeBenito 967fd1
Chris PeBenito 7a5e2d
	files_list_tmp($1)
Chris PeBenito 967fd1
	admin_pattern($1, fsdaemon_tmp_t)
Chris PeBenito 7a5e2d
Chris PeBenito 7a5e2d
	files_list_pids($1)
Chris PeBenito 967fd1
	admin_pattern($1, fsdaemon_var_run_t)
Chris PeBenito 7a5e2d
')