Chris PeBenito 4bf4ed
## <module name="hotplug" layer="system">
Chris PeBenito 4bf4ed
## <summary>
Chris PeBenito 4bf4ed
##	Policy for hotplug system, for supporting the
Chris PeBenito 4bf4ed
##	connection and disconnection of devices at runtime.
Chris PeBenito 4bf4ed
## </summary>
Chris PeBenito 6b9383
Chris PeBenito 6b9383
#######################################
Chris PeBenito 6b9383
#
Chris PeBenito c9428d
# hotplug_domtrans(domain)
Chris PeBenito 6b9383
#
Chris PeBenito c9428d
define(`hotplug_domtrans',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito dd8229
	allow $1 hotplug_exec_t:file rx_file_perms;
Chris PeBenito 0c73cd
	allow $1 hotplug_t:process transition;
Chris PeBenito 0c73cd
	type_transition $1 hotplug_exec_t:process hotplug_t;
Chris PeBenito 0c73cd
	dontaudit $1 hotplug_t:process { noatsecure siginh rlimitinh };
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 c9428d
define(`hotplug_domtrans_depend',`
Chris PeBenito 0c73cd
	type hotplug_t, hotplug_exec_t;
Chris PeBenito 0c73cd
Chris PeBenito dd8229
	class file rx_file_perms;
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 6b9383
')
Chris PeBenito 6b9383
Chris PeBenito 6b9383
#######################################
Chris PeBenito 6b9383
#
Chris PeBenito c9428d
# hotplug_exec(domain)
Chris PeBenito 6b9383
#
Chris PeBenito c9428d
define(`hotplug_exec',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito dd8229
	can_exec($1,hotplug_exec_t)
Chris PeBenito dd8229
Chris PeBenito 6b9383
')
Chris PeBenito 6b9383
Chris PeBenito c9428d
define(`hotplug_exec_depend',`
Chris PeBenito 0c73cd
	type hotplug_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class file { getattr read execute execute_no_trans };
Chris PeBenito 6b9383
')
Chris PeBenito 6b9383
Chris PeBenito 6b9383
#######################################
Chris PeBenito 6b9383
#
Chris PeBenito c9428d
# hotplug_use_fd(domain)
Chris PeBenito 6b9383
#
Chris PeBenito c9428d
define(`hotplug_use_fd',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 hotplug_t:fd use;
Chris PeBenito 6b9383
')
Chris PeBenito 6b9383
Chris PeBenito c9428d
define(`hotplug_use_fd_depend',`
Chris PeBenito 0c73cd
	type hotplug_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class fd use;
Chris PeBenito 6b9383
')
Chris PeBenito 1e5c2a
Chris PeBenito 13e94c
#######################################
Chris PeBenito 13e94c
#
Chris PeBenito c9428d
# hotplug_dontaudit_use_fd(domain)
Chris PeBenito 13e94c
#
Chris PeBenito c9428d
define(`hotplug_dontaudit_use_fd',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	dontaudit $1 hotplug_t:fd use;
Chris PeBenito 13e94c
')
Chris PeBenito 13e94c
Chris PeBenito c9428d
define(`hotplug_dontaudit_use_fd_depend',`
Chris PeBenito 0c73cd
	type hotplug_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class fd use;
Chris PeBenito 13e94c
')
Chris PeBenito 13e94c
Chris PeBenito 1e5c2a
########################################
Chris PeBenito 1e5c2a
#
Chris PeBenito c9428d
# hotplug_dontaudit_search_config(domain)
Chris PeBenito 1e5c2a
#
Chris PeBenito c9428d
define(`hotplug_dontaudit_search_config',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	dontaudit $1 hotplug_etc_t:dir search;
Chris PeBenito 1e5c2a
')
Chris PeBenito 1e5c2a
Chris PeBenito c9428d
define(`hotplug_dontaudit_search_config_depend',`
Chris PeBenito 0c73cd
	type hotplug_etc_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class dir search;
Chris PeBenito 1e5c2a
')
Chris PeBenito 1e5c2a
Chris PeBenito 1e5c2a
########################################
Chris PeBenito daa0e0
## <interface name="hotplug_read_config">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Read the configuration files for hotplug.
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 1e5c2a
#
Chris PeBenito 1e5c2a
define(`hotplug_read_config',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
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
Chris PeBenito 1e5c2a
define(`hotplug_read_config_depend',`
Chris PeBenito 0c73cd
	type hotplug_etc_t;
Chris PeBenito 0c73cd
Chris PeBenito dd8229
	class file r_file_perms;
Chris PeBenito dd8229
	class dir r_dir_perms;
Chris PeBenito dd8229
	class lnk_file r_file_perms;
Chris PeBenito 1e5c2a
')
Chris PeBenito 4bf4ed
Chris PeBenito 4bf4ed
## </module>