Chris PeBenito 17de1b
## <summary>Policy for udev.</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 837163
##	Send generic signals to udev.
Chris PeBenito 837163
## </summary>
Chris PeBenito 837163
## <param name="domain">
Chris PeBenito 837163
##	<summary>
Chris PeBenito 837163
##	Domain allowed access.
Chris PeBenito 837163
##	</summary>
Chris PeBenito 837163
## </param>
Chris PeBenito 837163
#
Chris PeBenito 837163
interface(`udev_signal',`
Chris PeBenito 837163
	gen_require(`
Chris PeBenito 837163
		type udev_t;
Chris PeBenito 837163
	')
Chris PeBenito 837163
Chris PeBenito 837163
	allow $1 udev_t:process signal;
Chris PeBenito 837163
')
Chris PeBenito 837163
Chris PeBenito 837163
########################################
Chris PeBenito 837163
## <summary>
Chris PeBenito 17de1b
##	Execute udev in the udev domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Dominick Grift a0546c
##	Domain allowed to transition.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`udev_domtrans',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type udev_t, udev_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito c0868a
	domtrans_pattern($1, udev_exec_t, udev_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 153fe2
##	Execute udev in the caller domain.
Chris PeBenito 153fe2
## </summary>
Chris PeBenito 153fe2
## <param name="domain">
Chris PeBenito 153fe2
##	<summary>
Chris PeBenito 153fe2
##	Domain allowed access.
Chris PeBenito 153fe2
##	</summary>
Chris PeBenito 153fe2
## </param>
Chris PeBenito 153fe2
#
Chris PeBenito 153fe2
interface(`udev_exec',`
Chris PeBenito 153fe2
	gen_require(`
Chris PeBenito 153fe2
		type udev_exec_t;
Chris PeBenito 153fe2
	')
Chris PeBenito 153fe2
Chris PeBenito 153fe2
	can_exec($1, udev_exec_t)
Chris PeBenito 153fe2
')
Chris PeBenito 153fe2
Chris PeBenito 153fe2
########################################
Chris PeBenito 153fe2
## <summary>
Chris PeBenito 17de1b
##	Execute a udev helper in the udev domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Dominick Grift a0546c
##	Domain allowed to transition.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`udev_helper_domtrans',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type udev_t, udev_helper_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito c0868a
	domtrans_pattern($1, udev_helper_exec_t, udev_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow process to read udev process state.
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(`udev_read_state',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type udev_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	kernel_search_proc($1)
Chris PeBenito c0868a
	allow $1 udev_t:file read_file_perms;
Chris PeBenito c0868a
	allow $1 udev_t:lnk_file read_lnk_file_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Do not audit attempts to inherit a
Chris PeBenito 17de1b
##	udev file descriptor.
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(`udev_dontaudit_use_fds',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type udev_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	dontaudit $1 udev_t:fd use;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Do not audit attempts to read or write
Chris PeBenito 17de1b
##	to a udev unix datagram socket.
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(`udev_dontaudit_rw_dgram_sockets',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type udev_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	dontaudit $1 udev_t:unix_dgram_socket { read write };
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito e2c945
##	Manage udev rules files
Chris PeBenito e2c945
## </summary>
Chris PeBenito e2c945
## <param name="domain">
Chris PeBenito e2c945
##	<summary>
Chris PeBenito e2c945
##	Domain allowed access.
Chris PeBenito e2c945
##	</summary>
Chris PeBenito e2c945
## </param>
Chris PeBenito e2c945
#
Chris PeBenito e2c945
interface(`udev_manage_rules_files',`
Chris PeBenito e2c945
	gen_require(`
Chris PeBenito e2c945
		type udev_rules_t;
Chris PeBenito e2c945
	')
Chris PeBenito e2c945
Chris PeBenito e2c945
	manage_files_pattern($1, udev_rules_t, udev_rules_t)
Chris PeBenito e2c945
')
Chris PeBenito e2c945
Chris PeBenito e2c945
########################################
Chris PeBenito e2c945
## <summary>
Chris PeBenito 3c9b2e
##	Do not audit search of udev database directories.
Chris PeBenito 3c9b2e
## </summary>
Chris PeBenito 3c9b2e
## <param name="domain">
Chris PeBenito 3c9b2e
##	<summary>
Chris PeBenito 3c9b2e
##	Domain to not audit.
Chris PeBenito 3c9b2e
##	</summary>
Chris PeBenito 3c9b2e
## </param>
Chris PeBenito 3c9b2e
#
Chris PeBenito 3c9b2e
interface(`udev_dontaudit_search_db',`
Chris PeBenito 3c9b2e
	gen_require(`
Chris PeBenito 3c9b2e
		type udev_tbl_t;
Chris PeBenito 3c9b2e
	')
Chris PeBenito 3c9b2e
Chris PeBenito 3c9b2e
	dontaudit $1 udev_tbl_t:dir search_dir_perms;
Chris PeBenito 3c9b2e
')
Chris PeBenito 3c9b2e
Chris PeBenito 3c9b2e
########################################
Chris PeBenito 3c9b2e
## <summary>
Chris PeBenito 402bbb
##	Read the udev device table.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 402bbb
## <desc>
Chris PeBenito 402bbb
##	

Chris PeBenito 402bbb
##	Allow the specified domain to read the udev device table.
Chris PeBenito 402bbb
##	

Chris PeBenito 402bbb
## </desc>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 402bbb
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 402bbb
## <infoflow type="read" weight="10"/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`udev_read_db',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 3c9b2e
		type udev_tbl_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	dev_list_all_dev_nodes($1)
Chris PeBenito 3c9b2e
	allow $1 udev_tbl_t:dir list_dir_perms;
Chris PeBenito 3c9b2e
	read_files_pattern($1, udev_tbl_t, udev_tbl_t)
Chris PeBenito 3c9b2e
	read_lnk_files_pattern($1, udev_tbl_t, udev_tbl_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow process to modify list of devices.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Dominick Grift a0546c
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`udev_rw_db',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 3c9b2e
		type udev_tbl_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	dev_list_all_dev_nodes($1)
Chris PeBenito 3c9b2e
	allow $1 udev_tbl_t:file rw_file_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 837163
Chris PeBenito 837163
########################################
Chris PeBenito 837163
## <summary>
Chris PeBenito 837163
##	Create, read, write, and delete
Chris PeBenito 837163
##	udev pid files.
Chris PeBenito 837163
## </summary>
Chris PeBenito 837163
## <param name="domain">
Chris PeBenito 837163
##	<summary>
Chris PeBenito 837163
##	Domain allowed access.
Chris PeBenito 837163
##	</summary>
Chris PeBenito 837163
## </param>
Chris PeBenito 837163
#
Chris PeBenito 837163
interface(`udev_manage_pid_files',`
Chris PeBenito 837163
	gen_require(`
Chris PeBenito 837163
		type udev_var_run_t;
Chris PeBenito 837163
	')
Chris PeBenito 837163
Chris PeBenito 837163
	files_search_var_lib($1)
Chris PeBenito 837163
	manage_files_pattern($1, udev_var_run_t, udev_var_run_t)
Chris PeBenito 837163
')