|
Chris PeBenito |
e32d52 |
## <summary>Policy for network configuration: ifconfig and dhcp client.</summary>
|
|
Chris PeBenito |
bd202f |
|
|
Chris PeBenito |
3865d6 |
#######################################
|
|
Chris PeBenito |
261e0e |
## <desc>
|
|
Chris PeBenito |
3865d6 |
## Execute dhcp client in dhcpc domain.
|
|
Chris PeBenito |
261e0e |
## </desc>
|
|
Chris PeBenito |
261e0e |
## <param name="domain">
|
|
Chris PeBenito |
3865d6 |
## The type of the process performing this action.
|
|
Chris PeBenito |
261e0e |
## </param>
|
|
Chris PeBenito |
1e5c2a |
#
|
|
Chris PeBenito |
199895 |
interface(`sysnet_domtrans_dhcpc',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type dhcpc_t, dhcpc_exec_t;
|
|
Chris PeBenito |
139520 |
class process sigchld;
|
|
Chris PeBenito |
139520 |
class fd use;
|
|
Chris PeBenito |
139520 |
class fifo_file rw_file_perms;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
139520 |
|
|
Chris PeBenito |
139520 |
corecmd_search_sbin($1)
|
|
Chris PeBenito |
0fd9dc |
domain_auto_trans($1, dhcpc_exec_t, dhcpc_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1 dhcpc_t:fd use;
|
|
Chris PeBenito |
0c73cd |
allow dhcpc_t $1:fd use;
|
|
Chris PeBenito |
0c73cd |
allow dhcpc_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
0c73cd |
allow dhcpc_t $1:process sigchld;
|
|
Chris PeBenito |
1e5c2a |
')
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
ebdc3b |
########################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
ebdc3b |
## Send a SIGCHLD signal to the dhcp client.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
ebdc3b |
## <param name="domain">
|
|
Chris PeBenito |
ebdc3b |
## The domain sending the SIGCHLD.
|
|
Chris PeBenito |
ebdc3b |
## </param>
|
|
Chris PeBenito |
ebdc3b |
#
|
|
Chris PeBenito |
ebdc3b |
interface(`sysnet_sigchld_dhcpc',`
|
|
Chris PeBenito |
ebdc3b |
gen_require(`
|
|
Chris PeBenito |
ebdc3b |
type dhcpc_t;
|
|
Chris PeBenito |
ebdc3b |
class process sigchld;
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
allow $1 dhcpc_t:process sigchld;
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
########################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
ebdc3b |
## Send a kill signal to the dhcp client.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
ebdc3b |
## <param name="domain">
|
|
Chris PeBenito |
ebdc3b |
## The domain sending the SIGKILL.
|
|
Chris PeBenito |
ebdc3b |
## </param>
|
|
Chris PeBenito |
ebdc3b |
#
|
|
Chris PeBenito |
ebdc3b |
interface(`sysnet_kill_dhcpc',`
|
|
Chris PeBenito |
ebdc3b |
gen_require(`
|
|
Chris PeBenito |
ebdc3b |
type dhcpc_t;
|
|
Chris PeBenito |
ebdc3b |
class process sigkill;
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
allow $1 dhcpc_t:process sigkill;
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
########################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
ebdc3b |
## Send a SIGSTOP signal to the dhcp client.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
ebdc3b |
## <param name="domain">
|
|
Chris PeBenito |
ebdc3b |
## The domain sending the SIGSTOP.
|
|
Chris PeBenito |
ebdc3b |
## </param>
|
|
Chris PeBenito |
ebdc3b |
#
|
|
Chris PeBenito |
ebdc3b |
interface(`sysnet_sigstop_dhcpc',`
|
|
Chris PeBenito |
ebdc3b |
gen_require(`
|
|
Chris PeBenito |
ebdc3b |
type dhcpc_t;
|
|
Chris PeBenito |
ebdc3b |
class process sigstop;
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
allow $1 dhcpc_t:process sigstop;
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
########################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
ebdc3b |
## Send a null signal to the dhcp client.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
ebdc3b |
## <param name="domain">
|
|
Chris PeBenito |
ebdc3b |
## The domain sending the null signal.
|
|
Chris PeBenito |
ebdc3b |
## </param>
|
|
Chris PeBenito |
ebdc3b |
#
|
|
Chris PeBenito |
ebdc3b |
interface(`sysnet_signull_dhcpc',`
|
|
Chris PeBenito |
ebdc3b |
gen_require(`
|
|
Chris PeBenito |
ebdc3b |
type dhcpc_t;
|
|
Chris PeBenito |
ebdc3b |
class process signull;
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
allow $1 dhcpc_t:process signull;
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
########################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
ebdc3b |
## Send a generic signal to the dhcp client.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
ebdc3b |
## <param name="domain">
|
|
Chris PeBenito |
ebdc3b |
## The domain sending the signal.
|
|
Chris PeBenito |
ebdc3b |
## </param>
|
|
Chris PeBenito |
ebdc3b |
#
|
|
Chris PeBenito |
ebdc3b |
interface(`sysnet_signal_dhcpc',`
|
|
Chris PeBenito |
ebdc3b |
gen_require(`
|
|
Chris PeBenito |
ebdc3b |
type dhcpc_t;
|
|
Chris PeBenito |
ebdc3b |
class process signal;
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
allow $1 dhcpc_t:process signal;
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
########################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
ebdc3b |
## Read and write dhcp configuration files.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
ebdc3b |
## <param name="domain">
|
|
Chris PeBenito |
ebdc3b |
## The domain allowed access.
|
|
Chris PeBenito |
ebdc3b |
## </param>
|
|
Chris PeBenito |
ebdc3b |
#
|
|
Chris PeBenito |
ebdc3b |
interface(`sysnet_rw_dhcp_config',`
|
|
Chris PeBenito |
ebdc3b |
gen_require(`
|
|
Chris PeBenito |
ebdc3b |
type dhcp_etc_t;
|
|
Chris PeBenito |
ebdc3b |
class file { getattr read };
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
files_search_etc($1)
|
|
Chris PeBenito |
ebdc3b |
allow $1 dhcp_etc_t:file { getattr read };
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
########################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
ebdc3b |
## Read dhcp client state files.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
ebdc3b |
## <param name="domain">
|
|
Chris PeBenito |
ebdc3b |
## The domain allowed access.
|
|
Chris PeBenito |
ebdc3b |
## </param>
|
|
Chris PeBenito |
ebdc3b |
#
|
|
Chris PeBenito |
ebdc3b |
interface(`sysnet_read_dhcpc_state',`
|
|
Chris PeBenito |
ebdc3b |
gen_require(`
|
|
Chris PeBenito |
ebdc3b |
type dhcpc_state_t;
|
|
Chris PeBenito |
ebdc3b |
class file { getattr read };
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
allow $1 dhcpc_state_t:file { getattr read };
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
#######################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
ebdc3b |
## Allow network init to read network config files.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
ebdc3b |
## <param name="domain">
|
|
Chris PeBenito |
ebdc3b |
## The type of the process performing this action.
|
|
Chris PeBenito |
ebdc3b |
## </param>
|
|
Chris PeBenito |
ebdc3b |
#
|
|
Chris PeBenito |
ebdc3b |
interface(`sysnet_read_config',`
|
|
Chris PeBenito |
ebdc3b |
gen_require(`
|
|
Chris PeBenito |
ebdc3b |
type net_conf_t;
|
|
Chris PeBenito |
ebdc3b |
class file r_file_perms;
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
files_search_etc($1)
|
|
Chris PeBenito |
ebdc3b |
allow $1 net_conf_t:file r_file_perms;
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
#######################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
e0d57f |
## Create, read, write, and delete network config files.
|
|
Chris PeBenito |
e0d57f |
## </summary>
|
|
Chris PeBenito |
e0d57f |
## <param name="domain">
|
|
Chris PeBenito |
e0d57f |
## The type of the process performing this action.
|
|
Chris PeBenito |
e0d57f |
## </param>
|
|
Chris PeBenito |
e0d57f |
#
|
|
Chris PeBenito |
e0d57f |
interface(`sysnet_manage_config',`
|
|
Chris PeBenito |
e0d57f |
gen_require(`
|
|
Chris PeBenito |
e0d57f |
type net_conf_t;
|
|
Chris PeBenito |
e0d57f |
class file create_file_perms;
|
|
Chris PeBenito |
e0d57f |
')
|
|
Chris PeBenito |
e0d57f |
|
|
Chris PeBenito |
e0d57f |
allow $1 net_conf_t:file r_file_perms;
|
|
Chris PeBenito |
e0d57f |
files_create_etc_config($1,net_conf_t,file)
|
|
Chris PeBenito |
e0d57f |
')
|
|
Chris PeBenito |
e0d57f |
|
|
Chris PeBenito |
e0d57f |
#######################################
|
|
Chris PeBenito |
e0d57f |
## <summary>
|
|
Chris PeBenito |
ebdc3b |
## Read the dhcp client pid file.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
ebdc3b |
## <param name="domain">
|
|
Chris PeBenito |
ebdc3b |
## The type of the process performing this action.
|
|
Chris PeBenito |
ebdc3b |
## </param>
|
|
Chris PeBenito |
ebdc3b |
#
|
|
Chris PeBenito |
ebdc3b |
interface(`sysnet_read_dhcpc_pid',`
|
|
Chris PeBenito |
ebdc3b |
gen_require(`
|
|
Chris PeBenito |
ebdc3b |
type dhcpc_var_run_t;
|
|
Chris PeBenito |
ebdc3b |
class file { getattr read };
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
files_list_pids($1)
|
|
Chris PeBenito |
ebdc3b |
allow $1 dhcpc_var_run_t:file { getattr read };
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
daa0e0 |
#######################################
|
|
Chris PeBenito |
414e41 |
## <desc>
|
|
Chris PeBenito |
414e41 |
## Execute ifconfig in the ifconfig domain.
|
|
Chris PeBenito |
414e41 |
## </desc>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
bd202f |
#
|
|
Chris PeBenito |
199895 |
interface(`sysnet_domtrans_ifconfig',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type ifconfig_t, ifconfig_exec_t;
|
|
Chris PeBenito |
139520 |
class process sigchld;
|
|
Chris PeBenito |
139520 |
class fd use;
|
|
Chris PeBenito |
139520 |
class fifo_file rw_file_perms;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
139520 |
|
|
Chris PeBenito |
139520 |
corecmd_search_sbin($1)
|
|
Chris PeBenito |
7edd02 |
domain_auto_trans($1, ifconfig_exec_t, ifconfig_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1 ifconfig_t:fd use;
|
|
Chris PeBenito |
0c73cd |
allow ifconfig_t $1:fd use;
|
|
Chris PeBenito |
0c73cd |
allow ifconfig_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
0c73cd |
allow ifconfig_t $1:process sigchld;
|
|
Chris PeBenito |
bd202f |
')
|
|
Chris PeBenito |
bd202f |
|
|
Chris PeBenito |
549180 |
########################################
|
|
Chris PeBenito |
414e41 |
## <desc>
|
|
Chris PeBenito |
414e41 |
## Execute ifconfig in the ifconfig domain, and
|
|
Chris PeBenito |
414e41 |
## allow the specified role the ifconfig domain,
|
|
Chris PeBenito |
414e41 |
## and use the caller's terminal.
|
|
Chris PeBenito |
414e41 |
## </desc>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
414e41 |
## <param name="role">
|
|
Chris PeBenito |
414e41 |
## The role to be allowed the ifconfig domain.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
414e41 |
## <param name="terminal">
|
|
Chris PeBenito |
414e41 |
## The type of the terminal allow the ifconfig domain to use.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
daa0e0 |
#
|
|
Chris PeBenito |
199895 |
interface(`sysnet_run_ifconfig',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type ifconfig_t;
|
|
Chris PeBenito |
139520 |
class chr_file rw_term_perms;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
139520 |
corecmd_search_sbin($1)
|
|
Chris PeBenito |
c9428d |
sysnet_domtrans_ifconfig($1)
|
|
Chris PeBenito |
0c73cd |
role $2 types ifconfig_t;
|
|
Chris PeBenito |
139520 |
allow ifconfig_t $3:chr_file rw_term_perms;
|
|
Chris PeBenito |
daa0e0 |
')
|