Chris PeBenito 17de1b
## <summary>Policy for network configuration: ifconfig and dhcp client.</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute dhcp client in dhcpc domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito ff8f0a
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`sysnet_domtrans_dhcpc',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type dhcpc_t, dhcpc_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 8021cb
	corecmd_search_bin($1)
Chris PeBenito c0868a
	domtrans_pattern($1, dhcpc_exec_t, dhcpc_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute DHCP clients in the dhcpc domain, and
Chris PeBenito 17de1b
##	allow the specified role the dhcpc domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="role">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The role to be allowed the clock domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`sysnet_run_dhcpc',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type dhcpc_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	sysnet_domtrans_dhcpc($1)
Chris PeBenito 17de1b
	role $2 types dhcpc_t;
Chris PeBenito 1fa92b
Chris PeBenito 1fa92b
	modutils_run_insmod(dhcpc_t, $2)
Chris PeBenito 1fa92b
Chris PeBenito 1fa92b
	sysnet_run_ifconfig(dhcpc_t, $2)
Chris PeBenito 1fa92b
Chris PeBenito 1fa92b
	optional_policy(`
Chris PeBenito 1fa92b
		consoletype_run(dhcpc_t, $2)
Chris PeBenito 1fa92b
	')
Chris PeBenito 1fa92b
Chris PeBenito 1fa92b
	optional_policy(`
Chris PeBenito 1fa92b
		hostname_run(dhcpc_t, $2)
Chris PeBenito 1fa92b
	')
Chris PeBenito 1fa92b
Chris PeBenito 1fa92b
	optional_policy(`
Chris PeBenito 1fa92b
		netutils_run(dhcpc_t, $2)
Chris PeBenito 1fa92b
		netutils_run_ping(dhcpc_t, $2)
Chris PeBenito 1fa92b
	')
Chris PeBenito 1fa92b
')
Chris PeBenito 1fa92b
Chris PeBenito 1fa92b
########################################
Chris PeBenito 1fa92b
## <summary>
Chris PeBenito 1fa92b
##	Do not audit attempts to use
Chris PeBenito 1fa92b
##	the dhcp file descriptors.
Chris PeBenito 1fa92b
## </summary>
Chris PeBenito 1fa92b
## <param name="domain">
Chris PeBenito 1fa92b
##	<summary>
Chris PeBenito 1fa92b
##	The domain sending the SIGCHLD.
Chris PeBenito 1fa92b
##	</summary>
Chris PeBenito 1fa92b
## </param>
Chris PeBenito 1fa92b
#
Chris PeBenito 1fa92b
interface(`sysnet_dontaudit_use_dhcpc_fds',`
Chris PeBenito 1fa92b
	gen_require(`
Chris PeBenito 1fa92b
		type dhcpc_t;
Chris PeBenito 1fa92b
	')
Chris PeBenito 1fa92b
Chris PeBenito 1fa92b
	dontaudit $1 dhcpc_t:fd use;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Send a SIGCHLD signal to the dhcp client.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The domain sending the SIGCHLD.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`sysnet_sigchld_dhcpc',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type dhcpc_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 dhcpc_t:process sigchld;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Send a kill signal to the dhcp client.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The domain sending the SIGKILL.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`sysnet_kill_dhcpc',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type dhcpc_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 dhcpc_t:process sigkill;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Send a SIGSTOP signal to the dhcp client.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The domain sending the SIGSTOP.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`sysnet_sigstop_dhcpc',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type dhcpc_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 dhcpc_t:process sigstop;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Send a null signal to the dhcp client.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The domain sending the null signal.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`sysnet_signull_dhcpc',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type dhcpc_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 dhcpc_t:process signull;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Send a generic signal to the dhcp client.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The domain sending the signal.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`sysnet_signal_dhcpc',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type dhcpc_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 dhcpc_t:process signal;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Send and receive messages from
Chris PeBenito 17de1b
##	dhcpc over dbus.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`sysnet_dbus_chat_dhcpc',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type dhcpc_t;
Chris PeBenito 17de1b
		class dbus send_msg;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 dhcpc_t:dbus send_msg;
Chris PeBenito 17de1b
	allow dhcpc_t $1:dbus send_msg;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read and write dhcp configuration files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`sysnet_rw_dhcp_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type dhcp_etc_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito 17de1b
	allow $1 dhcp_etc_t:file rw_file_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read dhcp client state files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`sysnet_read_dhcpc_state',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type dhcpc_state_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 1fa92b
	read_files_pattern($1, dhcpc_state_t, dhcpc_state_t)
Chris PeBenito 1fa92b
')
Chris PeBenito 1fa92b
Chris PeBenito 1fa92b
#######################################
Chris PeBenito 1fa92b
## <summary>
Chris PeBenito 1fa92b
##	Delete the dhcp client state files.
Chris PeBenito 1fa92b
## </summary>
Chris PeBenito 1fa92b
## <param name="domain">
Chris PeBenito 1fa92b
##	<summary>
Chris PeBenito 1fa92b
##	Domain allowed access.
Chris PeBenito 1fa92b
##	</summary>
Chris PeBenito 1fa92b
## </param>
Chris PeBenito 1fa92b
#
Chris PeBenito 1fa92b
interface(`sysnet_delete_dhcpc_state',`
Chris PeBenito 1fa92b
	gen_require(`
Chris PeBenito 1fa92b
		type dhcpc_state_t;
Chris PeBenito 1fa92b
	')
Chris PeBenito 1fa92b
Chris PeBenito 1fa92b
	delete_files_pattern($1, dhcpc_state_t, dhcpc_state_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 2ed4f5
##	Set the attributes of network config files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 2ed4f5
##	Domain allowed access.
Chris PeBenito 2ed4f5
##	</summary>
Chris PeBenito 2ed4f5
## </param>
Chris PeBenito 2ed4f5
#
Chris PeBenito 2ed4f5
interface(`sysnet_setattr_config',`
Chris PeBenito 2ed4f5
	gen_require(`
Chris PeBenito 2ed4f5
		type net_conf_t;
Chris PeBenito 2ed4f5
	')
Chris PeBenito 2ed4f5
Chris PeBenito 2ed4f5
	files_search_etc($1)
Chris PeBenito 2ed4f5
	allow $1 net_conf_t:file setattr;
Chris PeBenito 2ed4f5
')
Chris PeBenito 2ed4f5
Chris PeBenito 2ed4f5
#######################################
Chris PeBenito 2ed4f5
## <summary>
Chris PeBenito 2ed4f5
##	Read network config files.
Chris PeBenito 2ed4f5
## </summary>
Chris PeBenito d68871
## <desc>
Chris PeBenito d68871
##	

Chris PeBenito d68871
##	Allow the specified domain to read the
Chris PeBenito d68871
##	general network configuration files.  A
Chris PeBenito d68871
##	common example of this is the
Chris PeBenito d68871
##	/etc/resolv.conf file, which has domain
Chris PeBenito d68871
##	name system (DNS) server IP addresses.
Chris PeBenito d68871
##	Typically, most networking processes will
Chris PeBenito d68871
##	require	the access provided by this interface.
Chris PeBenito d68871
##	

Chris PeBenito d68871
##	

Chris PeBenito d68871
##	Higher-level interfaces which involve
Chris PeBenito d68871
##	networking will generally call this interface,
Chris PeBenito d68871
##	for example:
Chris PeBenito d68871
##	

Chris PeBenito d68871
##	
    Chris PeBenito d68871
    ##		
  • sysnet_dns_name_resolve()
  • Chris PeBenito d68871
    ##		
  • sysnet_use_ldap()
  • Chris PeBenito d68871
    ##		
  • sysnet_use_portmap()
  • Chris PeBenito d68871
    ##	
    Chris PeBenito d68871
    ## </desc>
    Chris PeBenito 2ed4f5
    ## <param name="domain">
    Chris PeBenito 2ed4f5
    ##	<summary>
    Chris PeBenito 2ed4f5
    ##	Domain allowed access.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito 17de1b
    #
    Chris PeBenito 17de1b
    interface(`sysnet_read_config',`
    Chris PeBenito 17de1b
    	gen_require(`
    Chris PeBenito 17de1b
    		type net_conf_t;
    Chris PeBenito 17de1b
    	')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    	files_search_etc($1)
    Chris PeBenito c0868a
    	allow $1 net_conf_t:file read_file_perms;
    Chris PeBenito 1fa92b
    Chris PeBenito 1fa92b
    	ifdef(`distro_redhat',`
    Chris PeBenito 1fa92b
    		allow $1 net_conf_t:dir list_dir_perms;
    Chris PeBenito 1fa92b
    		read_files_pattern($1, net_conf_t, net_conf_t)
    Chris PeBenito 1fa92b
    	')
    Chris PeBenito 17de1b
    ')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    #######################################
    Chris PeBenito 17de1b
    ## <summary>
    Chris PeBenito 17de1b
    ##	Do not audit attempts to read network config files.
    Chris PeBenito 17de1b
    ## </summary>
    Chris PeBenito 17de1b
    ## <param name="domain">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	Domain to not audit.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito 17de1b
    #
    Chris PeBenito 17de1b
    interface(`sysnet_dontaudit_read_config',`
    Chris PeBenito 17de1b
    	gen_require(`
    Chris PeBenito 17de1b
    		type net_conf_t;
    Chris PeBenito 17de1b
    	')
    Chris PeBenito 17de1b
    Chris PeBenito c0868a
    	dontaudit $1 net_conf_t:file read_file_perms;
    Chris PeBenito 17de1b
    ')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    #######################################
    Chris PeBenito 17de1b
    ## <summary>
    Chris PeBenito 2ed4f5
    ##	Write network config files.
    Chris PeBenito 2ed4f5
    ## </summary>
    Chris PeBenito 2ed4f5
    ## <param name="domain">
    Chris PeBenito 2ed4f5
    ##	<summary>
    Chris PeBenito 2ed4f5
    ##	Domain allowed access.
    Chris PeBenito 2ed4f5
    ##	</summary>
    Chris PeBenito 2ed4f5
    ## </param>
    Chris PeBenito 2ed4f5
    #
    Chris PeBenito 2ed4f5
    interface(`sysnet_write_config',`
    Chris PeBenito 2ed4f5
    	gen_require(`
    Chris PeBenito 2ed4f5
    		type net_conf_t;
    Chris PeBenito 2ed4f5
    	')
    Chris PeBenito 2ed4f5
    Chris PeBenito 2ed4f5
    	files_search_etc($1)
    Chris PeBenito 2ed4f5
    	allow $1 net_conf_t:file write_file_perms;
    Chris PeBenito 2ed4f5
    ')
    Chris PeBenito 2ed4f5
    Chris PeBenito 2ed4f5
    #######################################
    Chris PeBenito 2ed4f5
    ## <summary>
    Chris PeBenito 2ed4f5
    ##	Create network config files.
    Chris PeBenito 2ed4f5
    ## </summary>
    Chris PeBenito 2ed4f5
    ## <param name="domain">
    Chris PeBenito 2ed4f5
    ##	<summary>
    Chris PeBenito 2ed4f5
    ##	Domain allowed access.
    Chris PeBenito 2ed4f5
    ##	</summary>
    Chris PeBenito 2ed4f5
    ## </param>
    Chris PeBenito 2ed4f5
    #
    Chris PeBenito 2ed4f5
    interface(`sysnet_create_config',`
    Chris PeBenito 2ed4f5
    	gen_require(`
    Chris PeBenito 2ed4f5
    		type net_conf_t;
    Chris PeBenito 2ed4f5
    	')
    Chris PeBenito 2ed4f5
    Chris PeBenito 2ed4f5
    	files_search_etc($1)
    Chris PeBenito 2ed4f5
    	allow $1 net_conf_t:file create_file_perms;
    Chris PeBenito 2ed4f5
    ')
    Chris PeBenito 2ed4f5
    Chris PeBenito 2ed4f5
    #######################################
    Chris PeBenito 2ed4f5
    ## <summary>
    Chris PeBenito 17de1b
    ##	Create files in /etc with the type used for
    Chris PeBenito 17de1b
    ##	the network config files.
    Chris PeBenito 17de1b
    ## </summary>
    Chris PeBenito 17de1b
    ## <param name="domain">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	The type of the process performing this action.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito 17de1b
    #
    Chris PeBenito 17de1b
    interface(`sysnet_etc_filetrans_config',`
    Chris PeBenito 17de1b
    	gen_require(`
    Chris PeBenito 17de1b
    		type net_conf_t;
    Chris PeBenito 17de1b
    	')
    Chris PeBenito 17de1b
    Chris PeBenito 3f67f7
    	files_etc_filetrans($1, net_conf_t, file)
    Chris PeBenito 17de1b
    ')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    #######################################
    Chris PeBenito 17de1b
    ## <summary>
    Chris PeBenito 17de1b
    ##	Create, read, write, and delete network config files.
    Chris PeBenito 17de1b
    ## </summary>
    Chris PeBenito 17de1b
    ## <param name="domain">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	The type of the process performing this action.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito 17de1b
    #
    Chris PeBenito 17de1b
    interface(`sysnet_manage_config',`
    Chris PeBenito 17de1b
    	gen_require(`
    Chris PeBenito 17de1b
    		type net_conf_t;
    Chris PeBenito 17de1b
    	')
    Chris PeBenito 17de1b
    Chris PeBenito c0868a
    	allow $1 net_conf_t:file manage_file_perms;
    Chris PeBenito 1fa92b
    Chris PeBenito 1fa92b
    	ifdef(`distro_redhat',`
    Chris PeBenito 1fa92b
    		manage_files_pattern($1, net_conf_t, net_conf_t)
    Chris PeBenito 1fa92b
    	')
    Chris PeBenito 17de1b
    ')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    #######################################
    Chris PeBenito 17de1b
    ## <summary>
    Chris PeBenito 17de1b
    ##	Read the dhcp client pid file.
    Chris PeBenito 17de1b
    ## </summary>
    Chris PeBenito 17de1b
    ## <param name="domain">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	The type of the process performing this action.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito 17de1b
    #
    Chris PeBenito 17de1b
    interface(`sysnet_read_dhcpc_pid',`
    Chris PeBenito 17de1b
    	gen_require(`
    Chris PeBenito 17de1b
    		type dhcpc_var_run_t;
    Chris PeBenito 17de1b
    	')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    	files_list_pids($1)
    Chris PeBenito 82d277
    	allow $1 dhcpc_var_run_t:file read_file_perms;
    Chris PeBenito 17de1b
    ')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    #######################################
    Chris PeBenito 17de1b
    ## <summary>
    Chris PeBenito 17de1b
    ##	Delete the dhcp client pid file.
    Chris PeBenito 17de1b
    ## </summary>
    Chris PeBenito 17de1b
    ## <param name="domain">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	The type of the process performing this action.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito 17de1b
    #
    Chris PeBenito 17de1b
    interface(`sysnet_delete_dhcpc_pid',`
    Chris PeBenito 17de1b
    	gen_require(`
    Chris PeBenito 17de1b
    		type dhcpc_var_run_t;
    Chris PeBenito 17de1b
    	')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    	allow $1 dhcpc_var_run_t:file unlink;
    Chris PeBenito 17de1b
    ')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    #######################################
    Chris PeBenito 17de1b
    ## <summary>
    Chris PeBenito 17de1b
    ##	Execute ifconfig in the ifconfig domain.
    Chris PeBenito 17de1b
    ## </summary>
    Chris PeBenito 17de1b
    ## <param name="domain">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	The type of the process performing this action.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito 17de1b
    #
    Chris PeBenito 17de1b
    interface(`sysnet_domtrans_ifconfig',`
    Chris PeBenito 17de1b
    	gen_require(`
    Chris PeBenito 17de1b
    		type ifconfig_t, ifconfig_exec_t;
    Chris PeBenito 17de1b
    	')
    Chris PeBenito 17de1b
    Chris PeBenito 8021cb
    	corecmd_search_bin($1)
    Chris PeBenito c0868a
    	domtrans_pattern($1, ifconfig_exec_t, ifconfig_t)
    Chris PeBenito 17de1b
    ')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    ########################################
    Chris PeBenito 17de1b
    ## <summary>
    Chris PeBenito 17de1b
    ##	Execute ifconfig in the ifconfig domain, and
    Chris PeBenito 17de1b
    ##	allow the specified role the ifconfig domain,
    Chris PeBenito 17de1b
    ##	and use the caller's terminal.
    Chris PeBenito 17de1b
    ## </summary>
    Chris PeBenito 17de1b
    ## <param name="domain">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	The type of the process performing this action.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito 17de1b
    ## <param name="role">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	The role to be allowed the ifconfig domain.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito bbcd3c
    ## <rolecap/>
    Chris PeBenito 17de1b
    #
    Chris PeBenito 17de1b
    interface(`sysnet_run_ifconfig',`
    Chris PeBenito 17de1b
    	gen_require(`
    Chris PeBenito 17de1b
    		type ifconfig_t;
    Chris PeBenito 17de1b
    	')
    Chris PeBenito 17de1b
    Chris PeBenito 8021cb
    	corecmd_search_bin($1)
    Chris PeBenito 17de1b
    	sysnet_domtrans_ifconfig($1)
    Chris PeBenito 17de1b
    	role $2 types ifconfig_t;
    Chris PeBenito 17de1b
    ')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    #######################################
    Chris PeBenito 17de1b
    ## <summary>
    Chris PeBenito 17de1b
    ##	Execute ifconfig in the caller domain.
    Chris PeBenito 17de1b
    ## </summary>
    Chris PeBenito 17de1b
    ## <param name="domain">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	Domain allowed access.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito 17de1b
    #
    Chris PeBenito 17de1b
    interface(`sysnet_exec_ifconfig',`
    Chris PeBenito 17de1b
    	gen_require(`
    Chris PeBenito 17de1b
    		type ifconfig_exec_t;
    Chris PeBenito 17de1b
    	')
    Chris PeBenito 17de1b
    Chris PeBenito 8021cb
    	corecmd_search_bin($1)
    Chris PeBenito 3f67f7
    	can_exec($1, ifconfig_exec_t)
    Chris PeBenito 17de1b
    ')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    ########################################
    Chris PeBenito 17de1b
    ## <summary>
    Chris PeBenito e82895
    ##	Send a generic signal to ifconfig.
    Chris PeBenito e82895
    ## </summary>
    Chris PeBenito e82895
    ## <param name="domain">
    Chris PeBenito e82895
    ##	<summary>
    Chris PeBenito e82895
    ##	Domain allowed access.
    Chris PeBenito e82895
    ##	</summary>
    Chris PeBenito e82895
    ## </param>
    Chris PeBenito e82895
    ## <rolecap/>
    Chris PeBenito e82895
    #
    Chris PeBenito e82895
    interface(`sysnet_signal_ifconfig',`
    Chris PeBenito e82895
    	gen_require(`
    Chris PeBenito e82895
    		type ifconfig_t;
    Chris PeBenito e82895
    	')
    Chris PeBenito e82895
    Chris PeBenito e82895
    	allow $1 ifconfig_t:process signal;
    Chris PeBenito e82895
    ')
    Chris PeBenito e82895
    Chris PeBenito e82895
    ########################################
    Chris PeBenito e82895
    ## <summary>
    Chris PeBenito 17de1b
    ##	Read the DHCP configuration files.
    Chris PeBenito 17de1b
    ## </summary>
    Chris PeBenito 17de1b
    ## <param name="domain">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	Domain allowed access.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito 17de1b
    #
    Chris PeBenito 17de1b
    interface(`sysnet_read_dhcp_config',`
    Chris PeBenito 17de1b
    	gen_require(`
    Chris PeBenito 17de1b
    		type dhcp_etc_t;
    Chris PeBenito 17de1b
    	')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    	files_search_etc($1)
    Chris PeBenito 1fa92b
    	allow $1 dhcp_etc_t:dir list_dir_perms;
    Chris PeBenito 3f67f7
    	read_files_pattern($1, dhcp_etc_t, dhcp_etc_t)
    Chris PeBenito 17de1b
    ')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    ########################################
    Chris PeBenito 17de1b
    ## <summary>
    Chris PeBenito 17de1b
    ##	Search the DHCP state data directory.
    Chris PeBenito 17de1b
    ## </summary>
    Chris PeBenito 17de1b
    ## <param name="domain">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	Domain allowed access.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito 17de1b
    #
    Chris PeBenito 17de1b
    interface(`sysnet_search_dhcp_state',`
    Chris PeBenito 17de1b
    	gen_require(`
    Chris PeBenito 17de1b
    		type dhcp_state_t;
    Chris PeBenito 17de1b
    	')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    	files_search_var_lib($1)
    Chris PeBenito c0868a
    	allow $1 dhcp_state_t:dir search_dir_perms;
    Chris PeBenito 17de1b
    ')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    ########################################
    Chris PeBenito 17de1b
    ## <summary>
    Chris PeBenito 17de1b
    ##	Create DHCP state data.
    Chris PeBenito 17de1b
    ## </summary>
    Chris PeBenito 17de1b
    ## <desc>
    Chris PeBenito 17de1b
    ##	

    Chris PeBenito 17de1b
    ##	Create DHCP state data.
    Chris PeBenito 17de1b
    ##	

    Chris PeBenito 17de1b
    ##	

    Chris PeBenito 17de1b
    ##	This is added for DHCP server, as
    Chris PeBenito 17de1b
    ##	the server and client put their state
    Chris PeBenito 17de1b
    ##	files in the same directory.
    Chris PeBenito 17de1b
    ##	

    Chris PeBenito 17de1b
    ## </desc>
    Chris PeBenito 17de1b
    ## <param name="domain">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	Domain allowed access.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito 17de1b
    ## <param name="file_type">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	The type of the object to be created
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito 17de1b
    ## <param name="object_class">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	The object class.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito 17de1b
    #
    Chris PeBenito 17de1b
    interface(`sysnet_dhcp_state_filetrans',`
    Chris PeBenito 17de1b
    	gen_require(`
    Chris PeBenito 17de1b
    		type dhcp_state_t;
    Chris PeBenito 17de1b
    	')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    	files_search_var_lib($1)
    Chris PeBenito 3f67f7
    	filetrans_pattern($1, dhcp_state_t, $2, $3)
    Chris PeBenito 17de1b
    ')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    ########################################
    Chris PeBenito 17de1b
    ## <summary>
    Chris PeBenito 17de1b
    ##	Perform a DNS name resolution.
    Chris PeBenito 17de1b
    ## </summary>
    Chris PeBenito 17de1b
    ## <param name="domain">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	Domain allowed access.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito bbcd3c
    ## <rolecap/>
    Chris PeBenito 17de1b
    #
    Chris PeBenito 17de1b
    interface(`sysnet_dns_name_resolve',`
    Chris PeBenito 17de1b
    	gen_require(`
    Chris PeBenito 17de1b
    		type net_conf_t;
    Chris PeBenito 17de1b
    	')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    	allow $1 self:tcp_socket create_socket_perms;
    Chris PeBenito 17de1b
    	allow $1 self:udp_socket create_socket_perms;
    Chris PeBenito aadcb9
    	allow $1 self:netlink_route_socket r_netlink_socket_perms;
    Chris PeBenito 17de1b
    Chris PeBenito 190066
    	corenet_all_recvfrom_unlabeled($1)
    Chris PeBenito 190066
    	corenet_all_recvfrom_netlabel($1)
    Chris PeBenito 668b30
    	corenet_tcp_sendrecv_generic_if($1)
    Chris PeBenito 668b30
    	corenet_udp_sendrecv_generic_if($1)
    Chris PeBenito c12621
    	corenet_tcp_sendrecv_generic_node($1)
    Chris PeBenito c12621
    	corenet_udp_sendrecv_generic_node($1)
    Chris PeBenito 17de1b
    	corenet_tcp_sendrecv_dns_port($1)
    Chris PeBenito 17de1b
    	corenet_udp_sendrecv_dns_port($1)
    Chris PeBenito 17de1b
    	corenet_tcp_connect_dns_port($1)
    Chris PeBenito 17de1b
    	corenet_sendrecv_dns_client_packets($1)
    Chris PeBenito 17de1b
    Chris PeBenito 81a0fb
    	sysnet_read_config($1)
    Chris PeBenito 1fa92b
    Chris PeBenito 1fa92b
    	optional_policy(`
    Chris PeBenito 1fa92b
    		avahi_stream_connect($1)
    Chris PeBenito 1fa92b
    	')
    Chris PeBenito 1fa92b
    Chris PeBenito 1fa92b
    	optional_policy(`
    Chris PeBenito 1fa92b
    		nscd_socket_use($1)
    Chris PeBenito 1fa92b
    	')
    Chris PeBenito 17de1b
    ')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    ########################################
    Chris PeBenito 17de1b
    ## <summary>
    Chris PeBenito 17de1b
    ##	Connect and use a LDAP server.
    Chris PeBenito 17de1b
    ## </summary>
    Chris PeBenito 17de1b
    ## <param name="domain">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	Domain allowed access.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito 17de1b
    #
    Chris PeBenito 17de1b
    interface(`sysnet_use_ldap',`
    Chris PeBenito 17de1b
    	gen_require(`
    Chris PeBenito 17de1b
    		type net_conf_t;
    Chris PeBenito 17de1b
    	')		
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    	allow $1 self:tcp_socket create_socket_perms;
    Chris PeBenito 17de1b
    Chris PeBenito 190066
    	corenet_all_recvfrom_unlabeled($1)
    Chris PeBenito 190066
    	corenet_all_recvfrom_netlabel($1)
    Chris PeBenito 668b30
    	corenet_tcp_sendrecv_generic_if($1)
    Chris PeBenito c12621
    	corenet_tcp_sendrecv_generic_node($1)
    Chris PeBenito 17de1b
    	corenet_tcp_sendrecv_ldap_port($1)
    Chris PeBenito 17de1b
    	corenet_tcp_connect_ldap_port($1)
    Chris PeBenito 17de1b
    	corenet_sendrecv_ldap_client_packets($1)
    Chris PeBenito 17de1b
    Chris PeBenito 81a0fb
    	sysnet_read_config($1)
    Chris PeBenito 17de1b
    ')
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    ########################################
    Chris PeBenito 17de1b
    ## <summary>
    Chris PeBenito 17de1b
    ##	Connect and use remote port mappers.
    Chris PeBenito 17de1b
    ## </summary>
    Chris PeBenito 17de1b
    ## <param name="domain">
    Chris PeBenito 17de1b
    ##	<summary>
    Chris PeBenito 17de1b
    ##	Domain allowed access.
    Chris PeBenito 17de1b
    ##	</summary>
    Chris PeBenito 17de1b
    ## </param>
    Chris PeBenito 17de1b
    #
    Chris PeBenito 17de1b
    interface(`sysnet_use_portmap',`
    Chris PeBenito 17de1b
    	gen_require(`
    Chris PeBenito 17de1b
    		type net_conf_t;
    Chris PeBenito 17de1b
    	')		
    Chris PeBenito 17de1b
    Chris PeBenito 17de1b
    	allow $1 self:tcp_socket create_socket_perms;
    Chris PeBenito 17de1b
    	allow $1 self:udp_socket create_socket_perms;
    Chris PeBenito 17de1b
    Chris PeBenito 190066
    	corenet_all_recvfrom_unlabeled($1)
    Chris PeBenito 190066
    	corenet_all_recvfrom_netlabel($1)
    Chris PeBenito 668b30
    	corenet_tcp_sendrecv_generic_if($1)
    Chris PeBenito 668b30
    	corenet_udp_sendrecv_generic_if($1)
    Chris PeBenito c12621
    	corenet_tcp_sendrecv_generic_node($1)
    Chris PeBenito c12621
    	corenet_udp_sendrecv_generic_node($1)
    Chris PeBenito 17de1b
    	corenet_tcp_sendrecv_portmap_port($1)
    Chris PeBenito 17de1b
    	corenet_udp_sendrecv_portmap_port($1)
    Chris PeBenito 17de1b
    	corenet_tcp_connect_portmap_port($1)
    Chris PeBenito 17de1b
    	corenet_sendrecv_portmap_client_packets($1)
    Chris PeBenito 17de1b
    Chris PeBenito 81a0fb
    	sysnet_read_config($1)
    Chris PeBenito 17de1b
    ')