Chris PeBenito 17de1b
## <summary>TCP/IP encryption</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute ipsec in the ipsec domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`ipsec_domtrans',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type ipsec_t, ipsec_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito c0868a
	domtrans_pattern($1,ipsec_exec_t,ipsec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Connect to IPSEC using a unix domain stream socket.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`ipsec_stream_connect',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type ipsec_t, ipsec_var_run_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_pids($1)
Chris PeBenito c0868a
	stream_connect_pattern($1,ipsec_var_run_t,ipsec_var_run_t,ipsec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Get the attributes of an IPSEC key socket.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`ipsec_getattr_key_sockets',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type ipsec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 ipsec_t:key_socket getattr;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute the IPSEC management program in the caller domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`ipsec_exec_mgmt',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type ipsec_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	can_exec($1,ipsec_exec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read the IPSEC configuration
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`ipsec_read_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type ipsec_conf_file_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	allow $1 ipsec_conf_file_t:file read_file_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create, read, write, and delete the IPSEC pid files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`ipsec_manage_pid',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type ipsec_var_run_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_pids($1)
Chris PeBenito c0868a
	manage_files_pattern($1,ipsec_var_run_t,ipsec_var_run_t)
Chris PeBenito 17de1b
')
Chris PeBenito 9e8f65
Chris PeBenito 9e8f65
########################################
Chris PeBenito 9e8f65
## <summary>
Chris PeBenito 9e8f65
##	Execute racoon in the racoon domain.
Chris PeBenito 9e8f65
## </summary>
Chris PeBenito 9e8f65
## <param name="domain">
Chris PeBenito 9e8f65
##	<summary>
Chris PeBenito 9e8f65
##	The type of the process performing this action.
Chris PeBenito 9e8f65
##	</summary>
Chris PeBenito 9e8f65
## </param>
Chris PeBenito 9e8f65
#
Chris PeBenito 9e8f65
interface(`ipsec_domtrans_racoon',`
Chris PeBenito 9e8f65
	gen_require(`
Chris PeBenito 9e8f65
		type racoon_t, racoon_exec_t;
Chris PeBenito 9e8f65
	')
Chris PeBenito 9e8f65
Chris PeBenito 9e8f65
	domtrans_pattern($1,racoon_exec_t,racoon_t)
Chris PeBenito 9e8f65
')
Chris PeBenito 9e8f65
Chris PeBenito 9e8f65
########################################
Chris PeBenito 9e8f65
## <summary>
Chris PeBenito 9e8f65
##	Execute setkey in the setkey domain.
Chris PeBenito 9e8f65
## </summary>
Chris PeBenito 9e8f65
## <param name="domain">
Chris PeBenito 9e8f65
##	<summary>
Chris PeBenito 9e8f65
##	The type of the process performing this action.
Chris PeBenito 9e8f65
##	</summary>
Chris PeBenito 9e8f65
## </param>
Chris PeBenito 9e8f65
#
Chris PeBenito 9e8f65
interface(`ipsec_domtrans_setkey',`
Chris PeBenito 9e8f65
	gen_require(`
Chris PeBenito 9e8f65
		type setkey_t, setkey_exec_t;
Chris PeBenito 9e8f65
	')
Chris PeBenito 9e8f65
Chris PeBenito 9e8f65
	domtrans_pattern($1,setkey_exec_t,setkey_t)
Chris PeBenito 9e8f65
')
Chris PeBenito 9e8f65
Chris PeBenito 9e8f65
########################################
Chris PeBenito 9e8f65
## <summary>
Chris PeBenito 9e8f65
##	Execute setkey and allow the specified role the domains.
Chris PeBenito 9e8f65
## </summary>
Chris PeBenito 9e8f65
## <param name="domain">
Chris PeBenito 9e8f65
##	<summary>
Chris PeBenito 9e8f65
##	Domain allowed access.
Chris PeBenito 9e8f65
##	</summary>
Chris PeBenito 9e8f65
## </param>
Chris PeBenito 9e8f65
## <param name="role">
Chris PeBenito 9e8f65
##	<summary>
Chris PeBenito 9e8f65
##	The role to be allowed the racoon and setkey domains.
Chris PeBenito 9e8f65
##	</summary>
Chris PeBenito 9e8f65
## </param>
Chris PeBenito 9e8f65
## <param name="terminal">
Chris PeBenito 9e8f65
##	<summary>
Chris PeBenito 9e8f65
##	The type of the terminal allow the racoon and setkey domains to use.
Chris PeBenito 9e8f65
##	</summary>
Chris PeBenito 9e8f65
## </param>
Chris PeBenito 9e8f65
## <rolecap/>
Chris PeBenito 9e8f65
#
Chris PeBenito 9e8f65
interface(`ipsec_run_setkey',`
Chris PeBenito 9e8f65
	gen_require(`
Chris PeBenito 9e8f65
		type setkey_t;
Chris PeBenito 9e8f65
	')
Chris PeBenito 9e8f65
Chris PeBenito 9e8f65
	ipsec_domtrans_setkey($1)
Chris PeBenito 9e8f65
	role $2 types setkey_t;
Chris PeBenito 9e8f65
	allow setkey_t $3:chr_file rw_term_perms;
Chris PeBenito 9e8f65
')