Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
## Policy for hotplug system, for supporting the
Chris PeBenito 17de1b
## connection and disconnection of devices at runtime.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute hotplug with a domain transition.
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(`hotplug_domtrans',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hotplug_t, hotplug_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 8021cb
	corecmd_search_bin($1)
Chris PeBenito 3f67f7
	domtrans_pattern($1, hotplug_exec_t, hotplug_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute hotplug 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(`hotplug_exec',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hotplug_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 8021cb
	corecmd_search_bin($1)
Chris PeBenito 3f67f7
	can_exec($1, hotplug_exec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Inherit and use hotplug file descriptors.
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(`hotplug_use_fds',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hotplug_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 hotplug_t:fd use;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Do not audit attempts to inherit
Chris PeBenito 17de1b
##	hotplug file descriptors.
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(`hotplug_dontaudit_use_fds',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hotplug_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	dontaudit $1 hotplug_t:fd use;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Do not audit attempts to search the
Chris PeBenito 17de1b
##	hotplug configuration directories.
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(`hotplug_dontaudit_search_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hotplug_etc_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	dontaudit $1 hotplug_etc_t:dir search;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Get the attributes of the hotplug configuration 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(`hotplug_getattr_config_dirs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hotplug_etc_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 hotplug_etc_t:dir getattr;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Search the hotplug configuration 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(`hotplug_search_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hotplug_etc_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito c0868a
	allow $1 hotplug_etc_t:dir search_dir_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read the configuration files for hotplug.
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 bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`hotplug_read_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hotplug_etc_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	allow $1 hotplug_etc_t:dir list_dir_perms;
Chris PeBenito 3f67f7
	read_files_pattern($1, hotplug_etc_t, hotplug_etc_t)
Chris PeBenito 3f67f7
	read_lnk_files_pattern($1, hotplug_etc_t, hotplug_etc_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito ed38ca
########################################
Chris PeBenito ed38ca
## <summary>
Chris PeBenito ed38ca
##	Search the hotplug PIDs.
Chris PeBenito ed38ca
## </summary>
Chris PeBenito ed38ca
## <param name="domain">
Chris PeBenito ed38ca
##	<summary>
Chris PeBenito ed38ca
##	Domain allowed access.
Chris PeBenito ed38ca
##	</summary>
Chris PeBenito ed38ca
## </param>
Chris PeBenito ed38ca
#
Chris PeBenito ed38ca
interface(`hotplug_search_pids',`
Chris PeBenito ed38ca
	gen_require(`
Chris PeBenito ed38ca
		type hotplug_var_run_t;
Chris PeBenito ed38ca
	')
Chris PeBenito ed38ca
Chris PeBenito ed38ca
	allow $1 hotplug_var_run_t:dir search_dir_perms;
Chris PeBenito ed38ca
	files_search_pids($1)
Chris PeBenito ed38ca
')