Dominick Grift e41196
## <summary>Ainit ALSA configuration tool.</summary>
Chris PeBenito de8af9
Chris PeBenito de8af9
########################################
Chris PeBenito de8af9
## <summary>
Dominick Grift e41196
##	Execute a domain transition to run Alsa.
Chris PeBenito de8af9
## </summary>
Chris PeBenito de8af9
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Dominick Grift 77e4b5
##	Domain allowed to transition.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito de8af9
## </param>
Chris PeBenito de8af9
#
Chris PeBenito de8af9
interface(`alsa_domtrans',`
Chris PeBenito de8af9
	gen_require(`
Chris PeBenito 0bfccd
		type alsa_t, alsa_exec_t;
Chris PeBenito de8af9
	')
Chris PeBenito de8af9
Dan Walsh 3eaa99
	corecmd_search_bin($1)
Chris PeBenito c0868a
	domtrans_pattern($1, alsa_exec_t, alsa_t)
Chris PeBenito de8af9
')
Chris PeBenito de8af9
Chris PeBenito de8af9
########################################
Chris PeBenito de8af9
## <summary>
Dan Walsh ddd1cc
##	Execute a domain transition to run
Dan Walsh ddd1cc
##	Alsa, and allow the specified role
Dan Walsh ddd1cc
##	the Alsa domain.
Dan Walsh ddd1cc
## </summary>
Dan Walsh ddd1cc
## <param name="domain">
Dan Walsh ddd1cc
##	<summary>
Dan Walsh ddd1cc
##	Domain allowed to transition.
Dan Walsh ddd1cc
##	</summary>
Dan Walsh ddd1cc
## </param>
Dan Walsh ddd1cc
## <param name="role">
Dan Walsh ddd1cc
##	<summary>
Dan Walsh ddd1cc
##	Role allowed access.
Dan Walsh ddd1cc
##	</summary>
Dan Walsh ddd1cc
## </param>
Dan Walsh ddd1cc
#
Dan Walsh ddd1cc
interface(`alsa_run',`
Dan Walsh ddd1cc
	gen_require(`
Dan Walsh ddd1cc
		type alsa_t;
Dan Walsh ddd1cc
	')
Dan Walsh ddd1cc
Dan Walsh ddd1cc
	alsa_domtrans($1)
Dan Walsh ddd1cc
	role $2 types alsa_t;
Dan Walsh ddd1cc
')
Dan Walsh ddd1cc
Dan Walsh ddd1cc
########################################
Dan Walsh ddd1cc
## <summary>
Dominick Grift e41196
##	Read and write Alsa semaphores.
Chris PeBenito de8af9
## </summary>
Chris PeBenito de8af9
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito de8af9
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito de8af9
## </param>
Chris PeBenito de8af9
#
Chris PeBenito de8af9
interface(`alsa_rw_semaphores',`
Chris PeBenito de8af9
	gen_require(`
Chris PeBenito de8af9
		type alsa_t;
Chris PeBenito de8af9
	')
Chris PeBenito de8af9
Dan Walsh 3eaa99
	allow $1 alsa_t:sem rw_sem_perms;
Chris PeBenito de8af9
')
Chris PeBenito de8af9
Chris PeBenito de8af9
########################################
Chris PeBenito de8af9
## <summary>
Dominick Grift e41196
##	Read and write Alsa shared memory.
Chris PeBenito de8af9
## </summary>
Chris PeBenito de8af9
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito de8af9
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito de8af9
## </param>
Chris PeBenito de8af9
#
Chris PeBenito de8af9
interface(`alsa_rw_shared_mem',`
Chris PeBenito de8af9
	gen_require(`
Chris PeBenito de8af9
		type alsa_t;
Chris PeBenito de8af9
	')
Chris PeBenito de8af9
Dan Walsh 3eaa99
	allow $1 alsa_t:shm rw_shm_perms;
Chris PeBenito de8af9
')
Chris PeBenito 77b81c
Chris PeBenito 77b81c
########################################
Chris PeBenito 77b81c
## <summary>
Dominick Grift e41196
##	Read writable Alsa config files.
Chris PeBenito 77b81c
## </summary>
Chris PeBenito 77b81c
## <param name="domain">
Chris PeBenito 77b81c
##	<summary>
Chris PeBenito 77b81c
##	Domain allowed access.
Chris PeBenito 77b81c
##	</summary>
Chris PeBenito 77b81c
## </param>
Chris PeBenito 77b81c
#
Chris PeBenito 77b81c
interface(`alsa_read_rw_config',`
Chris PeBenito 77b81c
	gen_require(`
Chris PeBenito 77b81c
		type alsa_etc_rw_t;
Chris PeBenito 77b81c
	')
Chris PeBenito 77b81c
Dominick Grift e41196
	files_search_etc($1)
Chris PeBenito c0868a
	allow $1 alsa_etc_rw_t:dir list_dir_perms;
Chris PeBenito 0bfccd
	read_files_pattern($1, alsa_etc_rw_t, alsa_etc_rw_t)
Chris PeBenito 0bfccd
	read_lnk_files_pattern($1, alsa_etc_rw_t, alsa_etc_rw_t)
Dominick Grift e41196
Dominick Grift e41196
	ifdef(`distro_debian',`
Dominick Grift e41196
		files_search_usr($1)
Dominick Grift e41196
	')
Chris PeBenito 77b81c
')
Chris PeBenito f50856
Chris PeBenito f50856
########################################
Chris PeBenito f50856
## <summary>
Dominick Grift e41196
##	Manage writable Alsa config files.
Jeremy Solt 1d3d00
## </summary>
Jeremy Solt 1d3d00
## <param name="domain">
Jeremy Solt 1d3d00
##	<summary>
Jeremy Solt 1d3d00
##	Domain allowed access.
Jeremy Solt 1d3d00
##	</summary>
Jeremy Solt 1d3d00
## </param>
Jeremy Solt 1d3d00
#
Jeremy Solt 1d3d00
interface(`alsa_manage_rw_config',`
Jeremy Solt 1d3d00
	gen_require(`
Jeremy Solt 1d3d00
		type alsa_etc_rw_t;
Jeremy Solt 1d3d00
	')
Jeremy Solt 1d3d00
Dominick Grift e41196
	files_search_etc($1)
Jeremy Solt 1d3d00
	allow $1 alsa_etc_rw_t:dir list_dir_perms;
Jeremy Solt 1d3d00
	manage_files_pattern($1, alsa_etc_rw_t, alsa_etc_rw_t)
Jeremy Solt 1d3d00
	read_lnk_files_pattern($1, alsa_etc_rw_t, alsa_etc_rw_t)
Dominick Grift e41196
Dominick Grift e41196
	ifdef(`distro_debian',`
Dominick Grift e41196
		files_search_usr($1)
Dominick Grift e41196
	')
Jeremy Solt 1d3d00
')
Jeremy Solt 1d3d00
Jeremy Solt 1d3d00
########################################
Jeremy Solt 1d3d00
## <summary>
Chris PeBenito eca7eb
##	Read Alsa home files.
Chris PeBenito f50856
## </summary>
Chris PeBenito f50856
## <param name="domain">
Chris PeBenito f50856
##	<summary>
Chris PeBenito f50856
##	Domain allowed access.
Chris PeBenito f50856
##	</summary>
Chris PeBenito f50856
## </param>
Chris PeBenito f50856
#
Chris PeBenito eca7eb
interface(`alsa_read_home_files',`
Chris PeBenito f50856
	gen_require(`
Chris PeBenito eca7eb
		type alsa_home_t;
Chris PeBenito f50856
	')
Chris PeBenito f50856
Chris PeBenito eca7eb
	userdom_search_user_home_dirs($1)
Chris PeBenito eca7eb
	allow $1 alsa_home_t:file read_file_perms;
Chris PeBenito f50856
')
Dominick Grift e41196
Dominick Grift e41196
########################################
Dominick Grift e41196
## <summary>
Chris PeBenito eca7eb
##	Read Alsa lib files.
Chris PeBenito f50856
## </summary>
Chris PeBenito f50856
## <param name="domain">
Chris PeBenito f50856
##	<summary>
Chris PeBenito f50856
##	Domain allowed access.
Chris PeBenito f50856
##	</summary>
Chris PeBenito f50856
## </param>
Chris PeBenito f50856
#
Chris PeBenito f50856
interface(`alsa_read_lib',`
Chris PeBenito f50856
	gen_require(`
Chris PeBenito f50856
		type alsa_var_lib_t;
Chris PeBenito f50856
	')
Chris PeBenito f50856
Chris PeBenito eca7eb
	files_search_var_lib($1)
Chris PeBenito f50856
	read_files_pattern($1, alsa_var_lib_t, alsa_var_lib_t)
Dan Walsh 3eaa99
')