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

138 lines
2.6 KiB
Plaintext
Raw Normal View History

2010-08-26 13:41:21 +00:00
## <summary>Advanced Linux Sound Architecture.</summary>
2006-01-12 16:00:55 +00:00
########################################
## <summary>
2010-08-26 13:41:21 +00:00
## 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
')
2006-12-12 20:08:08 +00:00
domtrans_pattern($1, alsa_exec_t, alsa_t)
2010-08-26 13:41:21 +00:00
corecmd_search_bin($1)
2006-01-12 16:00:55 +00:00
')
########################################
## <summary>
2010-08-26 13:41:21 +00:00
## 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>
2010-08-26 13:41:21 +00:00
## 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>
2010-08-26 13:41:21 +00:00
## Read Alsa writable 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;
')
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)
2010-08-26 13:41:21 +00:00
files_search_etc($1)
2006-03-09 20:28:51 +00:00
')
2008-02-18 14:55:25 +00:00
########################################
## <summary>
2010-08-26 13:41:21 +00:00
## Manage Alsa writable config files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`alsa_manage_rw_config',`
gen_require(`
type alsa_etc_rw_t;
')
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-08-26 13:41:21 +00:00
files_search_etc($1)
')
2008-02-18 14:55:25 +00:00
########################################
## <summary>
2010-08-26 13:41:21 +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;
')
read_files_pattern($1, alsa_var_lib_t, alsa_var_lib_t)
2010-08-26 13:41:21 +00:00
files_search_var_lib($1)
')
########################################
## <summary>
## Read Alsa home files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`alsa_read_home_files',`
gen_require(`
type alsa_home_t;
')
allow $1 alsa_home_t:file read_file_perms;
userdom_search_user_home_dirs($1)
2008-02-18 14:55:25 +00:00
')