selinux-policy/policy/modules/admin/alsa.if

145 lines
2.7 KiB
Plaintext
Raw Normal View History

## <summary>Ainit ALSA configuration tool.</summary>
2006-01-12 16:00:55 +00:00
########################################
## <summary>
## Execute a domain transition to run Alsa.
2006-01-12 16:00:55 +00:00
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
2006-01-12 16:00:55 +00:00
## </param>
#
interface(`alsa_domtrans',`
gen_require(`
type alsa_t, alsa_exec_t;
2006-01-12 16:00:55 +00:00
')
2010-08-26 13:41:21 +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>
## Read and write Alsa semaphores.
2006-01-12 16:00:55 +00:00
## </summary>
## <param name="domain">
## <summary>
2006-01-12 16:00:55 +00:00
## Domain allowed access.
## </summary>
2006-01-12 16:00:55 +00:00
## </param>
#
interface(`alsa_rw_semaphores',`
gen_require(`
type alsa_t;
')
2010-08-26 13:41:21 +00:00
allow $1 alsa_t:sem rw_sem_perms;
2006-01-12 16:00:55 +00:00
')
########################################
## <summary>
## Read and write Alsa shared memory.
2006-01-12 16:00:55 +00:00
## </summary>
## <param name="domain">
## <summary>
2006-01-12 16:00:55 +00:00
## Domain allowed access.
## </summary>
2006-01-12 16:00:55 +00:00
## </param>
#
interface(`alsa_rw_shared_mem',`
gen_require(`
type alsa_t;
')
2010-08-26 13:41:21 +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>
## 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;
')
files_search_etc($1)
2006-12-12 20:08:08 +00:00
allow $1 alsa_etc_rw_t:dir list_dir_perms;
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)
ifdef(`distro_debian',`
files_search_usr($1)
')
2006-03-09 20:28:51 +00:00
')
2008-02-18 14:55:25 +00:00
########################################
## <summary>
## Manage writable Alsa config files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`alsa_manage_rw_config',`
gen_require(`
type alsa_etc_rw_t;
')
files_search_etc($1)
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)
ifdef(`distro_debian',`
files_search_usr($1)
')
')
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
')
########################################
## <summary>
2010-09-03 15:56:10 +00:00
## Read Alsa lib files.
2008-02-18 14:55:25 +00:00
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`alsa_read_lib',`
gen_require(`
type alsa_var_lib_t;
')
2010-09-03 15:56:10 +00:00
files_search_var_lib($1)
2008-02-18 14:55:25 +00:00
read_files_pattern($1, alsa_var_lib_t, alsa_var_lib_t)
2010-08-26 13:41:21 +00:00
')