2005-07-14 18:15:47 +00:00
|
|
|
## <summary>TCP/IP encryption</summary>
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute ipsec in the ipsec domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-14 18:15:47 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-14 18:15:47 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ipsec_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type ipsec_t, ipsec_exec_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
domtrans_pattern($1,ipsec_exec_t,ipsec_t)
|
2005-07-14 18:15:47 +00:00
|
|
|
')
|
2005-07-18 18:31:49 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2005-08-03 15:16:33 +00:00
|
|
|
## Connect to IPSEC using a unix domain stream socket.
|
2005-07-18 18:31:49 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-18 18:31:49 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-18 18:31:49 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2005-08-03 15:16:33 +00:00
|
|
|
interface(`ipsec_stream_connect',`
|
2005-07-18 18:31:49 +00:00
|
|
|
gen_require(`
|
2005-08-03 15:16:33 +00:00
|
|
|
type ipsec_t, ipsec_var_run_t;
|
2005-07-18 18:31:49 +00:00
|
|
|
')
|
|
|
|
|
2005-08-03 15:16:33 +00:00
|
|
|
files_search_pids($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
stream_connect_pattern($1,ipsec_var_run_t,ipsec_var_run_t,ipsec_t)
|
2005-07-18 18:31:49 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of an IPSEC key socket.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-18 18:31:49 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-18 18:31:49 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`ipsec_getattr_key_sockets',`
|
2005-07-18 18:31:49 +00:00
|
|
|
gen_require(`
|
|
|
|
type ipsec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 ipsec_t:key_socket getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute the IPSEC management program in the caller domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-18 18:31:49 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-18 18:31:49 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ipsec_exec_mgmt',`
|
|
|
|
gen_require(`
|
|
|
|
type ipsec_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
can_exec($1,ipsec_exec_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read the IPSEC configuration
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-18 18:31:49 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-18 18:31:49 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-07-18 18:31:49 +00:00
|
|
|
#
|
|
|
|
interface(`ipsec_read_config',`
|
|
|
|
gen_require(`
|
|
|
|
type ipsec_conf_file_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 ipsec_conf_file_t:file read_file_perms;
|
2005-07-18 18:31:49 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2007-11-14 15:53:18 +00:00
|
|
|
## Match the default SPD entry.
|
2005-07-18 18:31:49 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2007-11-14 15:53:18 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-18 18:31:49 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2007-11-14 15:53:18 +00:00
|
|
|
interface(`ipsec_match_default_spd',`
|
2005-07-18 18:31:49 +00:00
|
|
|
gen_require(`
|
2007-11-14 15:53:18 +00:00
|
|
|
type ipsec_spd_t;
|
2005-07-18 18:31:49 +00:00
|
|
|
')
|
|
|
|
|
2007-11-14 15:53:18 +00:00
|
|
|
allow $1 ipsec_spd_t:association polmatch;
|
2007-11-26 16:44:57 +00:00
|
|
|
allow $1 self:association sendto;
|
2005-07-18 18:31:49 +00:00
|
|
|
')
|
2007-03-26 20:47:29 +00:00
|
|
|
|
2007-11-14 14:38:45 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2007-11-14 15:53:18 +00:00
|
|
|
## Set the context of a SPD entry to
|
|
|
|
## the default context.
|
2007-11-14 14:38:45 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2007-11-14 15:53:18 +00:00
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
2007-11-14 14:38:45 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ipsec_setcontext_default_spd',`
|
|
|
|
gen_require(`
|
|
|
|
type ipsec_spd_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 ipsec_spd_t:association setcontext;
|
|
|
|
')
|
|
|
|
|
2007-11-14 15:53:18 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete the IPSEC pid files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ipsec_manage_pid',`
|
|
|
|
gen_require(`
|
|
|
|
type ipsec_var_run_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_pids($1)
|
|
|
|
manage_files_pattern($1,ipsec_var_run_t,ipsec_var_run_t)
|
|
|
|
')
|
|
|
|
|
2007-03-26 20:47:29 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute racoon in the racoon domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ipsec_domtrans_racoon',`
|
|
|
|
gen_require(`
|
|
|
|
type racoon_t, racoon_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
domtrans_pattern($1,racoon_exec_t,racoon_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute setkey in the setkey domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ipsec_domtrans_setkey',`
|
|
|
|
gen_require(`
|
|
|
|
type setkey_t, setkey_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
domtrans_pattern($1,setkey_exec_t,setkey_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute setkey and allow the specified role the domains.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## The role to be allowed the racoon and setkey domains.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="terminal">
|
|
|
|
## <summary>
|
|
|
|
## The type of the terminal allow the racoon and setkey domains to use.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`ipsec_run_setkey',`
|
|
|
|
gen_require(`
|
|
|
|
type setkey_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
ipsec_domtrans_setkey($1)
|
|
|
|
role $2 types setkey_t;
|
|
|
|
allow setkey_t $3:chr_file rw_term_perms;
|
|
|
|
')
|