Chris PeBenito 4bf4ed
## <summary>
Chris PeBenito 414e41
## Policy for hotplug system, for supporting the
Chris PeBenito 414e41
## connection and disconnection of devices at runtime.
Chris PeBenito 4bf4ed
## </summary>
Chris PeBenito 6b9383
Chris PeBenito ac9db9
########################################
Chris PeBenito ac9db9
## <summary>
Chris PeBenito ac9db9
##	Execute hotplug with a domain transition.
Chris PeBenito ac9db9
## </summary>
Chris PeBenito ac9db9
## <param name="domain">
Chris PeBenito ac9db9
##	<summary>
Chris PeBenito ac9db9
##	Domain allowed access.
Chris PeBenito ac9db9
##	</summary>
Chris PeBenito ac9db9
## </param>
Chris PeBenito 6b9383
#
Chris PeBenito 199895
interface(`hotplug_domtrans',`
Chris PeBenito 139520
	gen_require(`
Chris PeBenito 139520
		type hotplug_t, hotplug_exec_t;
Chris PeBenito 139520
	')
Chris PeBenito 0c73cd
Chris PeBenito 139520
	corecmd_search_sbin($1)
Chris PeBenito 139520
	domain_auto_trans($1,hotplug_exec_t,hotplug_t)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 hotplug_t:fd use;
Chris PeBenito 0c73cd
	allow hotplug_t $1:fd use;
Chris PeBenito 0c73cd
	allow hotplug_t $1:fifo_file rw_file_perms;
Chris PeBenito 0c73cd
	allow hotplug_t $1:process sigchld;
Chris PeBenito 6b9383
')
Chris PeBenito 6b9383
Chris PeBenito ac9db9
########################################
Chris PeBenito ac9db9
## <summary>
Chris PeBenito ac9db9
##	Execute hotplug in the caller domain.
Chris PeBenito ac9db9
## </summary>
Chris PeBenito ac9db9
## <param name="domain">
Chris PeBenito ac9db9
##	<summary>
Chris PeBenito ac9db9
##	Domain allowed access.
Chris PeBenito ac9db9
##	</summary>
Chris PeBenito ac9db9
## </param>
Chris PeBenito 6b9383
#
Chris PeBenito 199895
interface(`hotplug_exec',`
Chris PeBenito 139520
	gen_require(`
Chris PeBenito 139520
		type hotplug_t;
Chris PeBenito 139520
	')
Chris PeBenito 0c73cd
Chris PeBenito 139520
	corecmd_search_sbin($1)
Chris PeBenito dd8229
	can_exec($1,hotplug_exec_t)
Chris PeBenito 6b9383
')
Chris PeBenito 6b9383
Chris PeBenito ac9db9
########################################
Chris PeBenito ac9db9
## <summary>
Chris PeBenito ac9db9
##	Inherit and use hotplug file descriptors.
Chris PeBenito ac9db9
## </summary>
Chris PeBenito ac9db9
## <param name="domain">
Chris PeBenito ac9db9
##	<summary>
Chris PeBenito ac9db9
##	Domain allowed access.
Chris PeBenito ac9db9
##	</summary>
Chris PeBenito ac9db9
## </param>
Chris PeBenito 6b9383
#
Chris PeBenito 1c1ac6
interface(`hotplug_use_fds',`
Chris PeBenito 139520
	gen_require(`
Chris PeBenito 139520
		type hotplug_t;
Chris PeBenito 139520
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 hotplug_t:fd use;
Chris PeBenito 6b9383
')
Chris PeBenito 6b9383
Chris PeBenito ac9db9
########################################
Chris PeBenito ac9db9
## <summary>
Chris PeBenito ac9db9
##	Do not audit attempts to inherit
Chris PeBenito ac9db9
##	hotplug file descriptors.
Chris PeBenito ac9db9
## </summary>
Chris PeBenito ac9db9
## <param name="domain">
Chris PeBenito ac9db9
##	<summary>
Chris PeBenito ac9db9
##	Domain to not audit.
Chris PeBenito ac9db9
##	</summary>
Chris PeBenito ac9db9
## </param>
Chris PeBenito 13e94c
#
Chris PeBenito 1c1ac6
interface(`hotplug_dontaudit_use_fds',`
Chris PeBenito 139520
	gen_require(`
Chris PeBenito 139520
		type hotplug_t;
Chris PeBenito 139520
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	dontaudit $1 hotplug_t:fd use;
Chris PeBenito 13e94c
')
Chris PeBenito 13e94c
Chris PeBenito 1e5c2a
########################################
Chris PeBenito ac9db9
## <summary>
Chris PeBenito ac9db9
##	Do not audit attempts to search the
Chris PeBenito ac9db9
##	hotplug configuration directories.
Chris PeBenito ac9db9
## </summary>
Chris PeBenito ac9db9
## <param name="domain">
Chris PeBenito ac9db9
##	<summary>
Chris PeBenito ac9db9
##	Domain to not audit.
Chris PeBenito ac9db9
##	</summary>
Chris PeBenito ac9db9
## </param>
Chris PeBenito 1e5c2a
#
Chris PeBenito 199895
interface(`hotplug_dontaudit_search_config',`
Chris PeBenito 139520
	gen_require(`
Chris PeBenito 139520
		type hotplug_etc_t;
Chris PeBenito 139520
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	dontaudit $1 hotplug_etc_t:dir search;
Chris PeBenito 1e5c2a
')
Chris PeBenito 1e5c2a
Chris PeBenito 1e5c2a
########################################
Chris PeBenito ae9e27
## <summary>
Chris PeBenito ae9e27
##	Get the attributes of the hotplug configuration directory.
Chris PeBenito ae9e27
## </summary>
Chris PeBenito ae9e27
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ae9e27
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ae9e27
## </param>
Chris PeBenito ae9e27
#
Chris PeBenito 1815ba
interface(`hotplug_getattr_config_dirs',`
Chris PeBenito ae9e27
	gen_require(`
Chris PeBenito ae9e27
		type hotplug_etc_t;
Chris PeBenito ae9e27
	')
Chris PeBenito ae9e27
Chris PeBenito ae9e27
	allow $1 hotplug_etc_t:dir getattr;
Chris PeBenito ae9e27
')
Chris PeBenito ae9e27
Chris PeBenito ae9e27
########################################
Chris PeBenito ae9e27
## <summary>
Chris PeBenito ae9e27
##	Search the hotplug configuration directory.
Chris PeBenito ae9e27
## </summary>
Chris PeBenito ae9e27
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ae9e27
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ae9e27
## </param>
Chris PeBenito ae9e27
#
Chris PeBenito ae9e27
interface(`hotplug_search_config',`
Chris PeBenito ae9e27
	gen_require(`
Chris PeBenito ae9e27
		type hotplug_etc_t;
Chris PeBenito ae9e27
	')
Chris PeBenito ae9e27
Chris PeBenito 98a8ea
	allow $1 hotplug_etc_t:dir { getattr search };
Chris PeBenito ae9e27
')
Chris PeBenito ae9e27
Chris PeBenito ae9e27
########################################
Chris PeBenito ae9e27
## <summary>
Chris PeBenito 414e41
##	Read the configuration files for hotplug.
Chris PeBenito ae9e27
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 414e41
##	The type of the process performing this action.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 414e41
## </param>
Chris PeBenito 1e5c2a
#
Chris PeBenito 199895
interface(`hotplug_read_config',`
Chris PeBenito 139520
	gen_require(`
Chris PeBenito 139520
		type hotplug_etc_t;
Chris PeBenito 139520
	')
Chris PeBenito 0c73cd
Chris PeBenito c9428d
	files_search_etc($1)
Chris PeBenito dd8229
	allow $1 hotplug_etc_t:file r_file_perms;
Chris PeBenito dd8229
	allow $1 hotplug_etc_t:dir r_dir_perms;
Chris PeBenito dd8229
	allow $1 hotplug_etc_t:lnk_file r_file_perms;
Chris PeBenito 1e5c2a
')
Chris PeBenito 1e5c2a