2010-09-03 14:26:40 +00:00
|
|
|
## <summary>Ainit ALSA configuration tool.</summary>
|
2006-01-12 16:00:55 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-09-03 14:26:40 +00:00
|
|
|
## Execute a domain transition to run Alsa.
|
2006-01-12 16:00:55 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:45:31 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-12 16:00:55 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`alsa_domtrans',`
|
|
|
|
gen_require(`
|
2008-07-23 21:38:39 +00:00
|
|
|
type alsa_t, alsa_exec_t;
|
2006-01-12 16:00:55 +00:00
|
|
|
')
|
|
|
|
|
2010-09-03 14:26:40 +00:00
|
|
|
corecmd_search_bin($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
domtrans_pattern($1, alsa_exec_t, alsa_t)
|
2006-01-12 16:00:55 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-09-03 14:26:40 +00:00
|
|
|
## Read and write Alsa semaphores.
|
2006-01-12 16:00:55 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-12 16:00:55 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-12 16:00:55 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`alsa_rw_semaphores',`
|
|
|
|
gen_require(`
|
|
|
|
type alsa_t;
|
|
|
|
')
|
|
|
|
|
2010-09-03 14:26:40 +00:00
|
|
|
allow $1 alsa_t:sem rw_sem_perms;
|
2006-01-12 16:00:55 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-09-03 14:26:40 +00:00
|
|
|
## Read and write Alsa shared memory.
|
2006-01-12 16:00:55 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-12 16:00:55 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-12 16:00:55 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`alsa_rw_shared_mem',`
|
|
|
|
gen_require(`
|
|
|
|
type alsa_t;
|
|
|
|
')
|
|
|
|
|
2010-09-03 14:26:40 +00:00
|
|
|
allow $1 alsa_t:shm rw_shm_perms;
|
2006-01-12 16:00:55 +00:00
|
|
|
')
|
2006-03-09 20:28:51 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-09-03 14:26:40 +00:00
|
|
|
## Read writable Alsa config files.
|
2006-03-09 20:28:51 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`alsa_read_rw_config',`
|
|
|
|
gen_require(`
|
|
|
|
type alsa_etc_rw_t;
|
|
|
|
')
|
|
|
|
|
2010-09-03 14:26:40 +00:00
|
|
|
files_search_etc($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 alsa_etc_rw_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, alsa_etc_rw_t, alsa_etc_rw_t)
|
|
|
|
read_lnk_files_pattern($1, alsa_etc_rw_t, alsa_etc_rw_t)
|
2010-09-03 14:26:40 +00:00
|
|
|
|
|
|
|
ifdef(`distro_debian',`
|
|
|
|
files_search_usr($1)
|
|
|
|
')
|
2006-03-09 20:28:51 +00:00
|
|
|
')
|
2008-02-18 14:55:25 +00:00
|
|
|
|
2010-03-11 19:03:48 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-09-03 14:26:40 +00:00
|
|
|
## Manage writable Alsa config files.
|
2010-03-11 19:03:48 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`alsa_manage_rw_config',`
|
|
|
|
gen_require(`
|
|
|
|
type alsa_etc_rw_t;
|
|
|
|
')
|
|
|
|
|
2010-09-03 14:26:40 +00:00
|
|
|
files_search_etc($1)
|
2010-03-11 19:03:48 +00:00
|
|
|
allow $1 alsa_etc_rw_t:dir list_dir_perms;
|
|
|
|
manage_files_pattern($1, alsa_etc_rw_t, alsa_etc_rw_t)
|
|
|
|
read_lnk_files_pattern($1, alsa_etc_rw_t, alsa_etc_rw_t)
|
2010-09-03 14:26:40 +00:00
|
|
|
|
|
|
|
ifdef(`distro_debian',`
|
|
|
|
files_search_usr($1)
|
|
|
|
')
|
2010-03-11 19:03:48 +00:00
|
|
|
')
|
|
|
|
|
2008-02-18 14:55:25 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-09-03 15:56:10 +00:00
|
|
|
## Read Alsa home files.
|
2008-02-18 14:55:25 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-09-03 15:56:10 +00:00
|
|
|
interface(`alsa_read_home_files',`
|
2008-02-18 14:55:25 +00:00
|
|
|
gen_require(`
|
2010-09-03 15:56:10 +00:00
|
|
|
type alsa_home_t;
|
2008-02-18 14:55:25 +00:00
|
|
|
')
|
|
|
|
|
2010-09-03 15:56:10 +00:00
|
|
|
userdom_search_user_home_dirs($1)
|
|
|
|
allow $1 alsa_home_t:file read_file_perms;
|
2008-02-18 14:55:25 +00:00
|
|
|
')
|
2010-09-03 14:26:40 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-09-03 15:56:10 +00:00
|
|
|
## Read Alsa lib files.
|
2010-09-03 14:26:40 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-09-03 15:56:10 +00:00
|
|
|
interface(`alsa_read_lib',`
|
2010-09-03 14:26:40 +00:00
|
|
|
gen_require(`
|
2010-09-03 15:56:10 +00:00
|
|
|
type alsa_var_lib_t;
|
2010-09-03 14:26:40 +00:00
|
|
|
')
|
|
|
|
|
2010-09-03 15:56:10 +00:00
|
|
|
files_search_var_lib($1)
|
|
|
|
read_files_pattern($1, alsa_var_lib_t, alsa_var_lib_t)
|
2010-09-03 14:26:40 +00:00
|
|
|
')
|