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 c9428d
## <interface name="sysnet_domtrans_dhcpc">
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
## </interface>
Chris PeBenito 1e5c2a
#
Chris PeBenito c9428d
define(`sysnet_domtrans_dhcpc',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
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 c9428d
define(`sysnet_domtrans_dhcpc_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 c9428d
## <interface name="sysnet_domtrans_ifconfig">
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
## </interface>
Chris PeBenito bd202f
#
Chris PeBenito c9428d
define(`sysnet_domtrans_ifconfig',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
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 c9428d
define(`sysnet_domtrans_ifconfig_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 c9428d
## <interface name="sysnet_run_ifconfig">
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
## </interface>
Chris PeBenito daa0e0
#
Chris PeBenito c9428d
define(`sysnet_run_ifconfig',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito c9428d
	sysnet_domtrans_ifconfig($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 c9428d
define(`sysnet_run_ifconfig_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 c9428d
## <interface name="sysnet_read_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
## </interface>
Chris PeBenito 549180
#
Chris PeBenito c9428d
define(`sysnet_read_config',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
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
Chris PeBenito c9428d
define(`sysnet_read_config_depend',`
Chris PeBenito 0c73cd
	type net_conf_t;
Chris PeBenito 0c73cd
Chris PeBenito 7edd02
	class file r_file_perms;
Chris PeBenito 549180
')
Chris PeBenito e32d52
Chris PeBenito e32d52
## </module>