Chris PeBenito fa45da
## <summary>Ricci cluster management agent</summary>
Chris PeBenito fa45da
Chris PeBenito fa45da
########################################
Chris PeBenito fa45da
## <summary>
Chris PeBenito fa45da
##	Execute a domain transition to run ricci.
Chris PeBenito fa45da
## </summary>
Chris PeBenito fa45da
## <param name="domain">
Chris PeBenito fa45da
## <summary>
Chris PeBenito fa45da
##	Domain allowed to transition.
Chris PeBenito fa45da
## </summary>
Chris PeBenito fa45da
## </param>
Chris PeBenito fa45da
#
Chris PeBenito fa45da
interface(`ricci_domtrans',`
Chris PeBenito fa45da
	gen_require(`
Chris PeBenito fa45da
		type ricci_t, ricci_exec_t;
Chris PeBenito fa45da
	')
Chris PeBenito fa45da
Chris PeBenito 0bfccd
	domtrans_pattern($1, ricci_exec_t, ricci_t)
Chris PeBenito fa45da
')
Chris PeBenito fa45da
Dan Walsh 3eaa99
#######################################
Dan Walsh 3eaa99
## <summary>
Dan Walsh 3eaa99
##  Execute ricci server in the ricci domain.
Dan Walsh 3eaa99
## </summary>
Dan Walsh 3eaa99
## <param name="domain">
Dan Walsh 3eaa99
##  <summary>
Dan Walsh 3eaa99
##  Domain allowed access.
Dan Walsh 3eaa99
##  </summary>
Dan Walsh 3eaa99
## </param>
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
interface(`ricci_initrc_domtrans', `
Dan Walsh 3eaa99
    gen_require(`
Dan Walsh 3eaa99
        type ricci_initrc_exec_t;
Dan Walsh 3eaa99
    ')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
    init_labeled_script_domtrans($1, ricci_initrc_exec_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Chris PeBenito fa45da
########################################
Chris PeBenito fa45da
## <summary>
Chris PeBenito fa45da
##	Execute a domain transition to run ricci_modcluster.
Chris PeBenito fa45da
## </summary>
Chris PeBenito fa45da
## <param name="domain">
Chris PeBenito fa45da
## <summary>
Chris PeBenito fa45da
##	Domain allowed to transition.
Chris PeBenito fa45da
## </summary>
Chris PeBenito fa45da
## </param>
Chris PeBenito fa45da
#
Chris PeBenito fa45da
interface(`ricci_domtrans_modcluster',`
Chris PeBenito fa45da
	gen_require(`
Chris PeBenito fa45da
		type ricci_modcluster_t, ricci_modcluster_exec_t;
Chris PeBenito fa45da
	')
Chris PeBenito fa45da
Chris PeBenito 0bfccd
	domtrans_pattern($1, ricci_modcluster_exec_t, ricci_modcluster_t)
Chris PeBenito fa45da
')
Chris PeBenito fa45da
Chris PeBenito fa45da
########################################
Chris PeBenito fa45da
## <summary>
Chris PeBenito fa45da
##	Do not audit attempts to use
Chris PeBenito fa45da
##	ricci_modcluster file descriptors.
Chris PeBenito fa45da
## </summary>
Chris PeBenito fa45da
## <param name="domain">
Chris PeBenito fa45da
##	<summary>
Chris PeBenito a7ee7f
##	Domain to not audit.
Chris PeBenito fa45da
##	</summary>
Chris PeBenito fa45da
## </param>
Chris PeBenito fa45da
#
Chris PeBenito fa45da
interface(`ricci_dontaudit_use_modcluster_fds',`
Chris PeBenito fa45da
	gen_require(`
Chris PeBenito fa45da
		type ricci_modcluster_t;
Chris PeBenito fa45da
	')
Chris PeBenito fa45da
Chris PeBenito fa45da
	dontaudit $1 ricci_modcluster_t:fd use;
Chris PeBenito fa45da
')
Chris PeBenito fa45da
Chris PeBenito fa45da
########################################
Chris PeBenito fa45da
## <summary>
Chris PeBenito fa45da
##	Do not audit attempts to read write
Chris PeBenito fa45da
##	ricci_modcluster unamed pipes.
Chris PeBenito fa45da
## </summary>
Chris PeBenito fa45da
## <param name="domain">
Chris PeBenito fa45da
##	<summary>
Chris PeBenito a7ee7f
##	Domain to not audit.
Chris PeBenito fa45da
##	</summary>
Chris PeBenito fa45da
## </param>
Chris PeBenito fa45da
#
Chris PeBenito fa45da
interface(`ricci_dontaudit_rw_modcluster_pipes',`
Chris PeBenito fa45da
	gen_require(`
Chris PeBenito fa45da
		type ricci_modcluster_t;
Chris PeBenito fa45da
	')
Chris PeBenito fa45da
Chris PeBenito 3f67f7
	dontaudit $1 ricci_modcluster_t:fifo_file { read write };
Chris PeBenito fa45da
')
Chris PeBenito fa45da
Chris PeBenito fa45da
########################################
Chris PeBenito fa45da
## <summary>
Chris PeBenito fa45da
##	Connect to ricci_modclusterd over an unix stream socket.
Chris PeBenito fa45da
## </summary>
Chris PeBenito fa45da
## <param name="domain">
Chris PeBenito fa45da
##	<summary>
Chris PeBenito fa45da
##	Domain allowed access.
Chris PeBenito fa45da
##	</summary>
Chris PeBenito fa45da
## </param>
Chris PeBenito fa45da
#
Chris PeBenito fa45da
interface(`ricci_stream_connect_modclusterd',`
Chris PeBenito fa45da
	gen_require(`
Chris PeBenito fa45da
		type ricci_modclusterd_t, ricci_modcluster_var_run_t;
Chris PeBenito fa45da
	')
Chris PeBenito fa45da
Chris PeBenito fa45da
	files_search_pids($1)
Dominick Grift ac13ad
	stream_connect_pattern($1, ricci_modcluster_var_run_t, ricci_modcluster_var_run_t, ricci_modclusterd_t)
Chris PeBenito fa45da
')
Chris PeBenito fa45da
Chris PeBenito fa45da
########################################
Chris PeBenito fa45da
## <summary>
Dan Walsh 3eaa99
##	Read and write to ricci_modcluserd temporary file system.
Dan Walsh 3eaa99
## </summary>
Dan Walsh 3eaa99
## <param name="domain">
Dan Walsh 3eaa99
##	<summary>
Dan Walsh 3eaa99
##	Domain allowed access.
Dan Walsh 3eaa99
##	</summary>
Dan Walsh 3eaa99
## </param>
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
interface(`ricci_rw_modclusterd_tmpfs_files',`
Dan Walsh 3eaa99
	gen_require(`
Dan Walsh 3eaa99
		type ricci_modcluserd_tmpfs_t;
Dan Walsh 3eaa99
	')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	allow $1 ricci_modcluserd_tmpfs_t:file rw_file_perms;
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
########################################
Dan Walsh 3eaa99
## <summary>
Chris PeBenito fa45da
##	Execute a domain transition to run ricci_modlog.
Chris PeBenito fa45da
## </summary>
Chris PeBenito fa45da
## <param name="domain">
Chris PeBenito fa45da
## <summary>
Chris PeBenito fa45da
##	Domain allowed to transition.
Chris PeBenito fa45da
## </summary>
Chris PeBenito fa45da
## </param>
Chris PeBenito fa45da
#
Chris PeBenito fa45da
interface(`ricci_domtrans_modlog',`
Chris PeBenito fa45da
	gen_require(`
Chris PeBenito fa45da
		type ricci_modlog_t, ricci_modlog_exec_t;
Chris PeBenito fa45da
	')
Chris PeBenito fa45da
Chris PeBenito 0bfccd
	domtrans_pattern($1, ricci_modlog_exec_t, ricci_modlog_t)
Chris PeBenito fa45da
')
Chris PeBenito fa45da
Chris PeBenito fa45da
########################################
Chris PeBenito fa45da
## <summary>
Chris PeBenito fa45da
##	Execute a domain transition to run ricci_modrpm.
Chris PeBenito fa45da
## </summary>
Chris PeBenito fa45da
## <param name="domain">
Chris PeBenito fa45da
## <summary>
Chris PeBenito fa45da
##	Domain allowed to transition.
Chris PeBenito fa45da
## </summary>
Chris PeBenito fa45da
## </param>
Chris PeBenito fa45da
#
Chris PeBenito fa45da
interface(`ricci_domtrans_modrpm',`
Chris PeBenito fa45da
	gen_require(`
Chris PeBenito fa45da
		type ricci_modrpm_t, ricci_modrpm_exec_t;
Chris PeBenito fa45da
	')
Chris PeBenito fa45da
Chris PeBenito 0bfccd
	domtrans_pattern($1, ricci_modrpm_exec_t, ricci_modrpm_t)
Chris PeBenito fa45da
')
Chris PeBenito fa45da
Chris PeBenito fa45da
########################################
Chris PeBenito fa45da
## <summary>
Chris PeBenito fa45da
##	Execute a domain transition to run ricci_modservice.
Chris PeBenito fa45da
## </summary>
Chris PeBenito fa45da
## <param name="domain">
Chris PeBenito fa45da
## <summary>
Chris PeBenito fa45da
##	Domain allowed to transition.
Chris PeBenito fa45da
## </summary>
Chris PeBenito fa45da
## </param>
Chris PeBenito fa45da
#
Chris PeBenito fa45da
interface(`ricci_domtrans_modservice',`
Chris PeBenito fa45da
	gen_require(`
Chris PeBenito fa45da
		type ricci_modservice_t, ricci_modservice_exec_t;
Chris PeBenito fa45da
	')
Chris PeBenito fa45da
Chris PeBenito 0bfccd
	domtrans_pattern($1, ricci_modservice_exec_t, ricci_modservice_t)
Chris PeBenito fa45da
')
Chris PeBenito fa45da
Chris PeBenito fa45da
########################################
Chris PeBenito fa45da
## <summary>
Chris PeBenito fa45da
##	Execute a domain transition to run ricci_modstorage.
Chris PeBenito fa45da
## </summary>
Chris PeBenito fa45da
## <param name="domain">
Chris PeBenito fa45da
## <summary>
Chris PeBenito fa45da
##	Domain allowed to transition.
Chris PeBenito fa45da
## </summary>
Chris PeBenito fa45da
## </param>
Chris PeBenito fa45da
#
Chris PeBenito fa45da
interface(`ricci_domtrans_modstorage',`
Chris PeBenito fa45da
	gen_require(`
Chris PeBenito fa45da
		type ricci_modstorage_t, ricci_modstorage_exec_t;
Chris PeBenito fa45da
	')
Chris PeBenito fa45da
Chris PeBenito 0bfccd
	domtrans_pattern($1, ricci_modstorage_exec_t, ricci_modstorage_t)
Chris PeBenito fa45da
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
####################################
Dan Walsh 3eaa99
## <summary>
Dan Walsh 3eaa99
##      Allow the specified domain to manage ricci's lib files.
Dan Walsh 3eaa99
## </summary>
Dan Walsh 3eaa99
## <param name="domain">
Dan Walsh 3eaa99
##      <summary>
Dan Walsh 3eaa99
##      Domain allowed access.
Dan Walsh 3eaa99
##      </summary>
Dan Walsh 3eaa99
## </param>
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
interface(`ricci_manage_lib_files',`
Dan Walsh 3eaa99
    gen_require(`
Dan Walsh 3eaa99
        type ricci_var_lib_t;
Dan Walsh 3eaa99
    ')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
    files_search_var_lib($1)
Dan Walsh 3eaa99
    manage_dirs_pattern($1, ricci_var_lib_t, ricci_var_lib_t)
Dan Walsh 3eaa99
    manage_files_pattern($1, ricci_var_lib_t, ricci_var_lib_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
########################################
Dan Walsh 3eaa99
## <summary>
Dan Walsh 3eaa99
##	All of the rules required to administrate
Dan Walsh 3eaa99
##	an ricci environment
Dan Walsh 3eaa99
## </summary>
Dan Walsh 3eaa99
## <param name="domain">
Dan Walsh 3eaa99
##	<summary>
Dan Walsh 3eaa99
##	Domain allowed access.
Dan Walsh 3eaa99
##	</summary>
Dan Walsh 3eaa99
## </param>
Dan Walsh 3eaa99
## <param name="role">
Dan Walsh 3eaa99
##	<summary>
Dan Walsh 3eaa99
##	Role allowed access.
Dan Walsh 3eaa99
##	</summary>
Dan Walsh 3eaa99
## </param>
Dan Walsh 3eaa99
## <rolecap/>
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
interface(`ricci_admin',`
Dan Walsh 3eaa99
	gen_require(`
Dan Walsh 3eaa99
		type ricci_t, ricci_initrc_exec_t, ricci_tmp_t;
Dan Walsh 3eaa99
		type ricci_var_lib_t, ricci_var_log_t, ricci_var_run_t;
Dan Walsh 3eaa99
	')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	allow $1 ricci_t:process { ptrace signal_perms };
Dan Walsh 3eaa99
	ps_process_pattern($1, ricci_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	ricci_initrc_domtrans($1)
Dan Walsh 3eaa99
	domain_system_change_exemption($1)
Dan Walsh 3eaa99
	role_transition $2 ricci_initrc_exec_t system_r;
Dan Walsh 3eaa99
	allow $2 system_r;
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	files_search_tmp($1)
Dan Walsh 3eaa99
	admin_pattern($1, ricci_tmp_t)
Dan Walsh 3eaa99
	
Dan Walsh 3eaa99
	files_search_var_lib($1)
Dan Walsh 3eaa99
	admin_pattern($1, ricci_var_lib_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	logging_search_logs($1)
Dan Walsh 3eaa99
	admin_pattern($1, ricci_var_log_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	files_search_pids($1)
Dan Walsh 3eaa99
	admin_pattern($1, ricci_var_run_t)
Dan Walsh 3eaa99
')