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>
Dominick Grift a0546c
##	Domain allowed to transition.
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 3f67f7
	domtrans_pattern($1, ipsec_exec_t, ipsec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Dan Walsh 3eaa99
##	Execute ipsec in the ipsec mgmt 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(`ipsec_domtrans_mgmt',`
Dan Walsh 3eaa99
	gen_require(`
Dan Walsh 3eaa99
		type ipsec_mgmt_t, ipsec_mgmt_exec_t;
Dan Walsh 3eaa99
	')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	domtrans_pattern($1, ipsec_mgmt_exec_t, ipsec_mgmt_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
########################################
Dan Walsh 3eaa99
## <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>
Dominick Grift a0546c
##	Domain allowed access.
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 3f67f7
	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 90e65f
##	Connect to racoon using a unix domain stream socket.
Chris PeBenito 90e65f
## </summary>
Chris PeBenito 90e65f
## <param name="domain">
Chris PeBenito 90e65f
##	<summary>
Dominick Grift a0546c
##	Domain allowed access.
Chris PeBenito 90e65f
##	</summary>
Chris PeBenito 90e65f
## </param>
Chris PeBenito 90e65f
#
Chris PeBenito 90e65f
interface(`ipsec_stream_connect_racoon',`
Chris PeBenito 90e65f
	gen_require(`
Chris PeBenito 90e65f
		type racoon_t, ipsec_var_run_t;
Chris PeBenito 90e65f
	')
Chris PeBenito 90e65f
Chris PeBenito 90e65f
	files_search_pids($1)
Chris PeBenito 90e65f
	stream_connect_pattern($1, ipsec_var_run_t, ipsec_var_run_t, racoon_t)
Chris PeBenito 90e65f
')
Chris PeBenito 90e65f
Chris PeBenito 90e65f
########################################
Chris PeBenito 90e65f
## <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>
Dominick Grift a0546c
##	Domain allowed access.
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>
Dominick Grift a0546c
##	Domain allowed access.
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 3f67f7
	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>
Dominick Grift a0546c
##	Domain allowed access.
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 982035
##	Match the default SPD entry.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 982035
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 982035
interface(`ipsec_match_default_spd',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 982035
		type ipsec_spd_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 982035
	allow $1 ipsec_spd_t:association polmatch;
Chris PeBenito 0b6aca
	allow $1 self:association sendto;
Chris PeBenito 17de1b
')
Chris PeBenito 9e8f65
Chris PeBenito 9e8f65
########################################
Chris PeBenito 9e8f65
## <summary>
Chris PeBenito 982035
##	Set the context of a SPD entry to
Chris PeBenito 982035
##	the default context.
Chris PeBenito bdccba
## </summary>
Chris PeBenito bdccba
## <param name="domain">
Chris PeBenito 982035
##	<summary>
Chris PeBenito 982035
##	Domain allowed access.
Chris PeBenito 982035
##	</summary>
Chris PeBenito bdccba
## </param>
Chris PeBenito bdccba
#
Chris PeBenito bdccba
interface(`ipsec_setcontext_default_spd',`
Chris PeBenito bdccba
	gen_require(`
Chris PeBenito bdccba
		type ipsec_spd_t;
Chris PeBenito bdccba
	')
Chris PeBenito bdccba
Chris PeBenito bdccba
	allow $1 ipsec_spd_t:association setcontext;
Chris PeBenito bdccba
')
Chris PeBenito bdccba
Chris PeBenito bdccba
########################################
Chris PeBenito bdccba
## <summary>
Chris PeBenito e0ed76
##	write the ipsec_var_run_t files.
Chris PeBenito e0ed76
## </summary>
Chris PeBenito e0ed76
## <param name="domain">
Chris PeBenito e0ed76
##	<summary>
Chris PeBenito e0ed76
##	Domain allowed access.
Chris PeBenito e0ed76
##	</summary>
Chris PeBenito e0ed76
## </param>
Chris PeBenito e0ed76
#
Chris PeBenito e0ed76
interface(`ipsec_write_pid',`
Chris PeBenito e0ed76
	gen_require(`
Chris PeBenito e0ed76
		type ipsec_var_run_t;
Chris PeBenito e0ed76
	')
Chris PeBenito e0ed76
Chris PeBenito e0ed76
	files_search_pids($1)
Chris PeBenito e0ed76
	write_files_pattern($1, ipsec_var_run_t, ipsec_var_run_t)
Chris PeBenito e0ed76
')
Chris PeBenito e0ed76
Chris PeBenito e0ed76
########################################
Chris PeBenito e0ed76
## <summary>
Chris PeBenito 982035
##	Create, read, write, and delete the IPSEC pid files.
Chris PeBenito 982035
## </summary>
Chris PeBenito 982035
## <param name="domain">
Chris PeBenito 982035
##	<summary>
Dominick Grift a0546c
##	Domain allowed access.
Chris PeBenito 982035
##	</summary>
Chris PeBenito 982035
## </param>
Chris PeBenito 982035
#
Chris PeBenito 982035
interface(`ipsec_manage_pid',`
Chris PeBenito 982035
	gen_require(`
Chris PeBenito 982035
		type ipsec_var_run_t;
Chris PeBenito 982035
	')
Chris PeBenito 982035
Chris PeBenito 982035
	files_search_pids($1)
Chris PeBenito 3f67f7
	manage_files_pattern($1, ipsec_var_run_t, ipsec_var_run_t)
Chris PeBenito 982035
')
Chris PeBenito 982035
Chris PeBenito 982035
########################################
Chris PeBenito 982035
## <summary>
Chris PeBenito 9e8f65
##	Execute racoon in the racoon domain.
Chris PeBenito 9e8f65
## </summary>
Chris PeBenito 9e8f65
## <param name="domain">
Chris PeBenito 9e8f65
##	<summary>
Dominick Grift a0546c
##	Domain allowed to transition.
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 3f67f7
	domtrans_pattern($1, racoon_exec_t, racoon_t)
Chris PeBenito 9e8f65
')
Chris PeBenito 9e8f65
Chris PeBenito 9e8f65
########################################
Chris PeBenito 9e8f65
## <summary>
Chris PeBenito 832c1b
##	Execute racoon and allow the specified role the domain.
Chris PeBenito 832c1b
## </summary>
Chris PeBenito 832c1b
## <param name="domain">
Chris PeBenito 832c1b
##	<summary>
Dominick Grift a0546c
##	Domain allowed to transition.
Chris PeBenito 832c1b
##	</summary>
Chris PeBenito 832c1b
## </param>
Chris PeBenito 832c1b
## <param name="role">
Chris PeBenito 832c1b
##	<summary>
Chris PeBenito 832c1b
##	Role allowed access.
Chris PeBenito 832c1b
##	</summary>
Chris PeBenito 832c1b
## </param>
Chris PeBenito 832c1b
## <rolecap/>
Chris PeBenito 832c1b
#
Chris PeBenito 832c1b
interface(`ipsec_run_racoon',`
Chris PeBenito 832c1b
	gen_require(`
Chris PeBenito 832c1b
		type racoon_t;
Chris PeBenito 832c1b
	')
Chris PeBenito 832c1b
Chris PeBenito 832c1b
	ipsec_domtrans_racoon($1)
Chris PeBenito 832c1b
	role $2 types racoon_t;
Chris PeBenito 832c1b
')
Chris PeBenito 832c1b
Chris PeBenito 832c1b
########################################
Chris PeBenito 832c1b
## <summary>
Chris PeBenito 9e8f65
##	Execute setkey in the setkey domain.
Chris PeBenito 9e8f65
## </summary>
Chris PeBenito 9e8f65
## <param name="domain">
Chris PeBenito 9e8f65
##	<summary>
Dominick Grift a0546c
##	Domain allowed to transition.
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 3f67f7
	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>
Dominick Grift a0546c
##	Domain allowed to transition.
Chris PeBenito 9e8f65
##	</summary>
Chris PeBenito 9e8f65
## </param>
Chris PeBenito 9e8f65
## <param name="role">
Chris PeBenito 9e8f65
##	<summary>
Chris PeBenito a7ee7f
##	Role allowed access..
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
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
########################################
Dan Walsh 3eaa99
## <summary>
Dan Walsh 3eaa99
##	Send ipsec mgmt a signal
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
#
Dan Walsh 3eaa99
interface(`ipsec_signal_mgmt',`
Dan Walsh 3eaa99
	gen_require(`
Dan Walsh 3eaa99
		type ipsec_mgmt_t;
Dan Walsh 3eaa99
	')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	allow $1 ipsec_mgmt_t:process signal;
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
########################################
Dan Walsh 3eaa99
## <summary>
Dan Walsh 3eaa99
##	Send ipsec mgmt a signull
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
#
Dan Walsh 3eaa99
interface(`ipsec_signull_mgmt',`
Dan Walsh 3eaa99
	gen_require(`
Dan Walsh 3eaa99
		type ipsec_mgmt_t;
Dan Walsh 3eaa99
	')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	allow $1 ipsec_mgmt_t:process signull;
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
########################################
Dan Walsh 3eaa99
## <summary>
Dan Walsh 3eaa99
##	Send ipsec mgmt a kill signal.
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
#
Dan Walsh 3eaa99
interface(`ipsec_kill_mgmt',`
Dan Walsh 3eaa99
	gen_require(`
Dan Walsh 3eaa99
		type ipsec_mgmt_t;
Dan Walsh 3eaa99
	')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	allow $1 ipsec_mgmt_t:process sigkill;
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
######################################
Dan Walsh 3eaa99
## <summary>
Dan Walsh 3eaa99
##      Send and receive messages from
Dan Walsh 3eaa99
##      ipsec-mgmt over dbus.
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(`ipsec_mgmt_dbus_chat',`
Dan Walsh 3eaa99
        gen_require(`
Dan Walsh 3eaa99
                type ipsec_mgmt_t;
Dan Walsh 3eaa99
                class dbus send_msg;
Dan Walsh 3eaa99
        ')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
        allow $1 ipsec_mgmt_t:dbus send_msg;
Dan Walsh 3eaa99
        allow ipsec_mgmt_t $1:dbus send_msg;
Dan Walsh 3eaa99
')