|
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 |
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 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
3865d6 |
#######################################
|
|
Chris PeBenito |
261e0e |
## <desc>
|
|
Chris PeBenito |
3865d6 |
## Allow network init to read network config files.
|
|
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 |
549180 |
#
|
|
Chris PeBenito |
199895 |
interface(`sysnet_read_config',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type net_conf_t;
|
|
Chris PeBenito |
139520 |
class file r_file_perms;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
files_search_etc($1)
|
|
Chris PeBenito |
7edd02 |
allow $1 net_conf_t:file r_file_perms;
|
|
Chris PeBenito |
549180 |
')
|
|
Chris PeBenito |
549180 |
|