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 6b9383
# hotplug_transition(domain)
Chris PeBenito 6b9383
#
Chris PeBenito 6b9383
define(`hotplug_transition',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 hotplug_exec_t:file { getattr read execute };
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 6b9383
define(`hotplug_transition_depend',`
Chris PeBenito 0c73cd
	type hotplug_t, hotplug_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 6b9383
')
Chris PeBenito 6b9383
Chris PeBenito 6b9383
#######################################
Chris PeBenito 6b9383
#
Chris PeBenito 6b9383
# hotplug_execute(domain)
Chris PeBenito 6b9383
#
Chris PeBenito 6b9383
define(`hotplug_execute',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 hotplug_exec_t:file { getattr read execute execute_no_trans };
Chris PeBenito 6b9383
')
Chris PeBenito 6b9383
Chris PeBenito 6b9383
define(`hotplug_execute_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 6b9383
# hotplug_use_file_descriptors(domain)
Chris PeBenito 6b9383
#
Chris PeBenito 6b9383
define(`hotplug_use_file_descriptors',`
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 6b9383
define(`hotplug_use_file_descriptors_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 13e94c
# hotplug_ignore_use_file_descriptors(domain)
Chris PeBenito 13e94c
#
Chris PeBenito 13e94c
define(`hotplug_ignore_use_file_descriptors',`
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 13e94c
define(`hotplug_ignore_use_file_descriptors_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 1e5c2a
# hotplug_ignore_search_config_directory(domain)
Chris PeBenito 1e5c2a
#
Chris PeBenito 1e5c2a
define(`hotplug_ignore_search_config_directory',`
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 1e5c2a
define(`hotplug_ignore_search_config_directory_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
##	<infoflow type="read" weight="10"/>
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 0c73cd
	files_search_general_system_config_directory($1)
Chris PeBenito 0c73cd
	allow $1 hotplug_etc_t:file { read getattr lock ioctl };
Chris PeBenito 0c73cd
	allow $1 hotplug_etc_t:dir { read getattr lock search ioctl };
Chris PeBenito 0c73cd
	allow $1 hotplug_etc_t:lnk_file { getattr read };
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 0c73cd
	class file { read getattr lock ioctl };
Chris PeBenito 0c73cd
	class dir { read getattr lock search ioctl };
Chris PeBenito 0c73cd
	class lnk_file { getattr read };
Chris PeBenito 1e5c2a
')
Chris PeBenito 4bf4ed
Chris PeBenito 4bf4ed
## </module>