Chris PeBenito 17de1b
## <summary>Zebra border gateway protocol network routing service</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read the configuration files for zebra.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`zebra_read_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type zebra_conf_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	allow $1 zebra_conf_t:dir list_dir_perms;
Chris PeBenito ce8a52
	read_files_pattern($1, zebra_conf_t, zebra_conf_t)
Chris PeBenito ce8a52
	read_lnk_files_pattern($1, zebra_conf_t, zebra_conf_t)
Chris PeBenito ce8a52
')
Chris PeBenito ce8a52
Chris PeBenito ce8a52
########################################
Chris PeBenito ce8a52
## <summary>
Chris PeBenito bed0a4
##	Connect to zebra over an unix stream socket.
Chris PeBenito bed0a4
## </summary>
Chris PeBenito bed0a4
## <param name="domain">
Chris PeBenito bed0a4
##	<summary>
Chris PeBenito bed0a4
##	Domain allowed access.
Chris PeBenito bed0a4
##	</summary>
Chris PeBenito bed0a4
## </param>
Chris PeBenito bed0a4
#
Chris PeBenito bed0a4
interface(`zebra_stream_connect',`
Chris PeBenito bed0a4
	gen_require(`
Chris PeBenito bed0a4
		type zebra_t, zebra_var_run_t;
Chris PeBenito bed0a4
	')
Chris PeBenito bed0a4
Chris PeBenito bed0a4
	files_search_pids($1)
Chris PeBenito bed0a4
	allow $1 zebra_var_run_t:sock_file write;
Chris PeBenito bed0a4
	allow $1 zebra_t:unix_stream_socket connectto;
Chris PeBenito bed0a4
')
Chris PeBenito bed0a4
Chris PeBenito bed0a4
########################################
Chris PeBenito bed0a4
## <summary>
Chris PeBenito bed0a4
##	All of the rules required to administrate
Chris PeBenito ce8a52
##	an zebra environment
Chris PeBenito ce8a52
## </summary>
Chris PeBenito ce8a52
## <param name="domain">
Chris PeBenito ce8a52
##	<summary>
Chris PeBenito ce8a52
##	Domain allowed access.
Chris PeBenito ce8a52
##	</summary>
Chris PeBenito ce8a52
## </param>
Chris PeBenito e87221
## <param name="role">
Chris PeBenito e87221
##	<summary>
Chris PeBenito e87221
##	The role to be allowed to manage the zebra domain.
Chris PeBenito e87221
##	</summary>
Chris PeBenito e87221
## </param>
Chris PeBenito ce8a52
## <rolecap/>
Chris PeBenito ce8a52
#
Chris PeBenito ce8a52
interface(`zebra_admin',`
Chris PeBenito ce8a52
	gen_require(`
Chris PeBenito ce8a52
		type zebra_t, zebra_tmp_t, zebra_log_t;
Chris PeBenito ce8a52
		type zebra_conf_t, zebra_var_run_t;
Chris PeBenito e87221
		type zebra_initrc_exec_t;
Chris PeBenito ce8a52
	')
Chris PeBenito ce8a52
Chris PeBenito e87221
	allow $1 zebra_t:process { ptrace signal_perms };
Chris PeBenito e87221
	ps_process_pattern($1, zebra_t)
Chris PeBenito 2a9837
Chris PeBenito e87221
	init_labeled_script_domtrans($1, zebra_initrc_exec_t)
Chris PeBenito e87221
	domain_system_change_exemption($1)
Chris PeBenito e87221
	role_transition $2 zebra_initrc_exec_t system_r;
Chris PeBenito e87221
	allow $2 system_r;
Chris PeBenito ce8a52
Chris PeBenito e87221
	files_list_etc($1)
Chris PeBenito e87221
	admin_pattern($1, zebra_conf_t)
Chris PeBenito 2a9837
Chris PeBenito ce8a52
	logging_list_logs($1)
Chris PeBenito e87221
	admin_pattern($1, zebra_log_t)
Chris PeBenito ce8a52
Chris PeBenito e87221
	files_list_tmp($1)
Chris PeBenito e87221
	admin_pattern($1, zebra_tmp_t)
Chris PeBenito ce8a52
Chris PeBenito ce8a52
	files_list_pids($1)
Chris PeBenito e87221
	admin_pattern($1, zebra_var_run_t)
Chris PeBenito 17de1b
')