sysnetwork: Debian stores network interface configuration in /run/network (ifstate), That directory is created by the /etc/init.d/networking script.

Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
This commit is contained in:
Dominick Grift 2013-09-26 23:46:32 +02:00 committed by Chris PeBenito
parent 360438c194
commit ac5d072465
3 changed files with 21 additions and 1 deletions

View File

@ -72,3 +72,8 @@ ifdef(`distro_redhat',`
ifdef(`distro_gentoo',` ifdef(`distro_gentoo',`
/var/lib/dhcpc(/.*)? gen_context(system_u:object_r:dhcpc_state_t,s0) /var/lib/dhcpc(/.*)? gen_context(system_u:object_r:dhcpc_state_t,s0)
') ')
ifdef(`distro_debian',`
/var/run/network(/.*)? gen_context(system_u:object_r:net_conf_t,s0)
')

View File

@ -287,7 +287,7 @@ interface(`sysnet_setattr_config',`
') ')
files_search_etc($1) files_search_etc($1)
allow $1 net_conf_t:file setattr; allow $1 net_conf_t:file setattr_file_perms;
') ')
####################################### #######################################
@ -333,6 +333,12 @@ interface(`sysnet_read_config',`
allow $1 net_conf_t:dir list_dir_perms; allow $1 net_conf_t:dir list_dir_perms;
read_files_pattern($1, net_conf_t, net_conf_t) read_files_pattern($1, net_conf_t, net_conf_t)
') ')
ifdef(`distro_debian',`
files_search_pids($1)
allow $1 net_conf_t:dir list_dir_perms;
read_files_pattern($1, net_conf_t, net_conf_t)
')
') ')
####################################### #######################################
@ -435,6 +441,11 @@ interface(`sysnet_manage_config',`
ifdef(`distro_redhat',` ifdef(`distro_redhat',`
manage_files_pattern($1, net_conf_t, net_conf_t) manage_files_pattern($1, net_conf_t, net_conf_t)
') ')
ifdef(`distro_debian',`
files_search_pids($1)
manage_files_pattern($1, net_conf_t, net_conf_t)
')
') ')
####################################### #######################################

View File

@ -39,6 +39,10 @@ role system_r types ifconfig_t;
type net_conf_t alias resolv_conf_t; type net_conf_t alias resolv_conf_t;
files_type(net_conf_t) files_type(net_conf_t)
ifdef(`distro_debian',`
init_daemon_run_dir(net_conf_t, "network")
')
######################################## ########################################
# #
# DHCP client local policy # DHCP client local policy