|
Chris PeBenito |
e32d52 |
## <module name="sysnetwork" layer="system">
|
|
Chris PeBenito |
e32d52 |
## <summary>Policy for network configuration: ifconfig and dhcp client.</summary>
|
|
Chris PeBenito |
bd202f |
|
|
Chris PeBenito |
3865d6 |
#######################################
|
|
Chris PeBenito |
3865d6 |
## <interface name="sysnetwork_dhcpc_transition">
|
|
Chris PeBenito |
3865d6 |
## <description>
|
|
Chris PeBenito |
3865d6 |
## Execute dhcp client in dhcpc domain.
|
|
Chris PeBenito |
3865d6 |
## </description>
|
|
Chris PeBenito |
3865d6 |
## <parameter name="domain">
|
|
Chris PeBenito |
3865d6 |
## The type of the process performing this action.
|
|
Chris PeBenito |
3865d6 |
## </parameter>
|
|
Chris PeBenito |
3865d6 |
## <infoflow type="read" weight="3"/>
|
|
Chris PeBenito |
3865d6 |
## </interface>
|
|
Chris PeBenito |
1e5c2a |
#
|
|
Chris PeBenito |
1e5c2a |
define(`sysnetwork_dhcpc_transition',`
|
|
Chris PeBenito |
0c73cd |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1 dhcpc_exec_t:file { getattr read execute };
|
|
Chris PeBenito |
0c73cd |
allow $1 dhcpc_t:process transition;
|
|
Chris PeBenito |
0c73cd |
type_transition $1 dhcpc_exec_t:process dhcpc_t;
|
|
Chris PeBenito |
0c73cd |
dontaudit $1 dhcpc_t:process { noatsecure siginh rlimitinh };
|
|
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 |
1e5c2a |
define(`sysnetwork_dhcpc_transition_depend',`
|
|
Chris PeBenito |
0c73cd |
type dhcpc_t, dhcpc_exec_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
class file { getattr read execute };
|
|
Chris PeBenito |
0c73cd |
class process { transition noatsecure siginh rlimitinh sigchld };
|
|
Chris PeBenito |
0c73cd |
class fd use;
|
|
Chris PeBenito |
0c73cd |
class fifo_file rw_file_perms;
|
|
Chris PeBenito |
1e5c2a |
')
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
daa0e0 |
#######################################
|
|
Chris PeBenito |
daa0e0 |
## <interface name="sysnetwork_ifconfig_transition">
|
|
Chris PeBenito |
daa0e0 |
## <description>
|
|
Chris PeBenito |
daa0e0 |
## Execute ifconfig in the ifconfig domain.
|
|
Chris PeBenito |
daa0e0 |
## </description>
|
|
Chris PeBenito |
daa0e0 |
## <parameter name="domain">
|
|
Chris PeBenito |
daa0e0 |
## The type of the process performing this action.
|
|
Chris PeBenito |
daa0e0 |
## </parameter>
|
|
Chris PeBenito |
daa0e0 |
## <infoflow type="write" weight="10"/>
|
|
Chris PeBenito |
daa0e0 |
## </interface>
|
|
Chris PeBenito |
bd202f |
#
|
|
Chris PeBenito |
bd202f |
define(`sysnetwork_ifconfig_transition',`
|
|
Chris PeBenito |
0c73cd |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1 ifconfig_exec_t:file { getattr read execute };
|
|
Chris PeBenito |
0c73cd |
allow $1 ifconfig_t:process transition;
|
|
Chris PeBenito |
0c73cd |
type_transition $1 ifconfig_exec_t:process ifconfig_t;
|
|
Chris PeBenito |
0c73cd |
dontaudit $1 ifconfig_t:process { noatsecure siginh rlimitinh };
|
|
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 |
bd202f |
define(`sysnetwork_ifconfig_transition_depend',`
|
|
Chris PeBenito |
0c73cd |
type ifconfig_t, ifconfig_exec_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
class file { getattr read execute };
|
|
Chris PeBenito |
0c73cd |
class process { transition noatsecure siginh rlimitinh sigchld };
|
|
Chris PeBenito |
0c73cd |
class fd use;
|
|
Chris PeBenito |
0c73cd |
class fifo_file rw_file_perms;
|
|
Chris PeBenito |
bd202f |
')
|
|
Chris PeBenito |
bd202f |
|
|
Chris PeBenito |
549180 |
########################################
|
|
Chris PeBenito |
daa0e0 |
## <interface name="sysnetwork_ifconfig_transition_add_role_use_terminal">
|
|
Chris PeBenito |
daa0e0 |
## <description>
|
|
Chris PeBenito |
daa0e0 |
## Execute ifconfig in the ifconfig domain, and
|
|
Chris PeBenito |
daa0e0 |
## allow the specified role the ifconfig domain,
|
|
Chris PeBenito |
daa0e0 |
## and use the caller's terminal.
|
|
Chris PeBenito |
daa0e0 |
## </description>
|
|
Chris PeBenito |
daa0e0 |
## <parameter name="domain">
|
|
Chris PeBenito |
daa0e0 |
## The type of the process performing this action.
|
|
Chris PeBenito |
daa0e0 |
## </parameter>
|
|
Chris PeBenito |
daa0e0 |
## <parameter name="role">
|
|
Chris PeBenito |
daa0e0 |
## The role to be allowed the ifconfig domain.
|
|
Chris PeBenito |
daa0e0 |
## </parameter>
|
|
Chris PeBenito |
daa0e0 |
## <parameter name="terminal">
|
|
Chris PeBenito |
daa0e0 |
## The type of the terminal allow the ifconfig domain to use.
|
|
Chris PeBenito |
daa0e0 |
## </parameter>
|
|
Chris PeBenito |
daa0e0 |
## <infoflow type="write" weight="10"/>
|
|
Chris PeBenito |
daa0e0 |
## </interface>
|
|
Chris PeBenito |
daa0e0 |
#
|
|
Chris PeBenito |
daa0e0 |
define(`sysnetwork_ifconfig_transition_add_role_use_terminal',`
|
|
Chris PeBenito |
0c73cd |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
sysnetwork_ifconfig_transition($1)
|
|
Chris PeBenito |
0c73cd |
role $2 types ifconfig_t;
|
|
Chris PeBenito |
0c73cd |
allow ifconfig_t $3:chr_file { getattr read write ioctl };
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
daa0e0 |
define(`sysnetwork_ifconfig_transition_add_role_use_terminal_depend',`
|
|
Chris PeBenito |
0c73cd |
type ifconfig_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
class chr_file { getattr read write ioctl };
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
3865d6 |
#######################################
|
|
Chris PeBenito |
3865d6 |
## <interface name="sysnetwork_read_network_config">
|
|
Chris PeBenito |
3865d6 |
## <description>
|
|
Chris PeBenito |
3865d6 |
## Allow network init to read network config files.
|
|
Chris PeBenito |
3865d6 |
## </description>
|
|
Chris PeBenito |
3865d6 |
## <parameter name="domain">
|
|
Chris PeBenito |
3865d6 |
## The type of the process performing this action.
|
|
Chris PeBenito |
3865d6 |
## </parameter>
|
|
Chris PeBenito |
3865d6 |
## <infoflow type="read" weight="3"/>
|
|
Chris PeBenito |
3865d6 |
## </interface>
|
|
Chris PeBenito |
549180 |
#
|
|
Chris PeBenito |
549180 |
define(`sysnetwork_read_network_config',`
|
|
Chris PeBenito |
0c73cd |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
files_search_general_system_config_directory($1)
|
|
Chris PeBenito |
0c73cd |
allow $1 net_conf_t:file { getattr read };
|
|
Chris PeBenito |
549180 |
')
|
|
Chris PeBenito |
549180 |
|
|
Chris PeBenito |
549180 |
define(`sysnetwork_read_network_config_depend',`
|
|
Chris PeBenito |
0c73cd |
type net_conf_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
class file { getattr read };
|
|
Chris PeBenito |
549180 |
')
|
|
Chris PeBenito |
e32d52 |
|
|
Chris PeBenito |
e32d52 |
## </module>
|