add alsa
This commit is contained in:
parent
50b089330e
commit
de8af9dc65
@ -5,6 +5,7 @@
|
|||||||
- Add swat to samba module.
|
- Add swat to samba module.
|
||||||
- Numerous miscellaneous fixes from Dan Walsh.
|
- Numerous miscellaneous fixes from Dan Walsh.
|
||||||
- Added modules:
|
- Added modules:
|
||||||
|
alsa
|
||||||
automount
|
automount
|
||||||
ddcprobe
|
ddcprobe
|
||||||
fetchmail
|
fetchmail
|
||||||
|
4
refpolicy/policy/modules/admin/alsa.fc
Normal file
4
refpolicy/policy/modules/admin/alsa.fc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
/etc/alsa/pcm(/.*)? gen_context(system_u:object_r:alsa_etc_rw_t,s0)
|
||||||
|
|
||||||
|
/usr/bin/ainit -- gen_context(system_u:object_r:alsa_exec_t,s0)
|
55
refpolicy/policy/modules/admin/alsa.if
Normal file
55
refpolicy/policy/modules/admin/alsa.if
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
## <summary>Ainit ALSA configuration tool</summary>
|
||||||
|
|
||||||
|
########################################
|
||||||
|
## <summary>
|
||||||
|
## Domain transition to alsa
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## Domain allowed access.
|
||||||
|
## </param>
|
||||||
|
#
|
||||||
|
interface(`alsa_domtrans',`
|
||||||
|
gen_require(`
|
||||||
|
type alsa_t;
|
||||||
|
type alsa_exec_t;
|
||||||
|
')
|
||||||
|
|
||||||
|
domain_auto_trans($1, alsa_exec_t, alsa_t)
|
||||||
|
|
||||||
|
allow $1 alsa_t:fd use;
|
||||||
|
allow alsa_t $1:fd use;
|
||||||
|
allow alsa_t $1:fifo_file rw_file_perms;
|
||||||
|
allow alsa_t $1:process sigchld;
|
||||||
|
')
|
||||||
|
|
||||||
|
########################################
|
||||||
|
## <summary>
|
||||||
|
## Allow read and write access to alsa semaphores.
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## Domain allowed access.
|
||||||
|
## </param>
|
||||||
|
#
|
||||||
|
interface(`alsa_rw_semaphores',`
|
||||||
|
gen_require(`
|
||||||
|
type alsa_t;
|
||||||
|
')
|
||||||
|
|
||||||
|
allow $1 alsa_t:sem { unix_read unix_write associate read write };
|
||||||
|
')
|
||||||
|
|
||||||
|
########################################
|
||||||
|
## <summary>
|
||||||
|
## Allow read and write access to alsa shared memory.
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## Domain allowed access.
|
||||||
|
## </param>
|
||||||
|
#
|
||||||
|
interface(`alsa_rw_shared_mem',`
|
||||||
|
gen_require(`
|
||||||
|
type alsa_t;
|
||||||
|
')
|
||||||
|
|
||||||
|
allow $1 alsa_t:shm { unix_read unix_write create_shm_perms };
|
||||||
|
')
|
50
refpolicy/policy/modules/admin/alsa.te
Normal file
50
refpolicy/policy/modules/admin/alsa.te
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
|
||||||
|
policy_module(alsa,1.0.0)
|
||||||
|
|
||||||
|
########################################
|
||||||
|
#
|
||||||
|
# Declarations
|
||||||
|
#
|
||||||
|
|
||||||
|
type alsa_t;
|
||||||
|
type alsa_exec_t;
|
||||||
|
domain_type(alsa_t)
|
||||||
|
domain_entry_file(alsa_t, alsa_exec_t)
|
||||||
|
role system_r types alsa_t;
|
||||||
|
|
||||||
|
type alsa_etc_rw_t;
|
||||||
|
files_type(alsa_etc_rw_t)
|
||||||
|
|
||||||
|
########################################
|
||||||
|
#
|
||||||
|
# Local policy
|
||||||
|
#
|
||||||
|
|
||||||
|
allow alsa_t self:capability { setgid setuid ipc_owner };
|
||||||
|
dontaudit alsa_t self:capability sys_admin;
|
||||||
|
allow alsa_t self:sem create_sem_perms;
|
||||||
|
allow alsa_t self:shm create_shm_perms;
|
||||||
|
allow alsa_t self:unix_stream_socket create_stream_socket_perms;
|
||||||
|
allow alsa_t self:unix_dgram_socket create_socket_perms;
|
||||||
|
|
||||||
|
allow alsa_t alsa_etc_rw_t:dir rw_dir_perms;
|
||||||
|
allow alsa_t alsa_etc_rw_t:file create_file_perms;
|
||||||
|
allow alsa_t alsa_etc_rw_t:lnk_file create_lnk_perms;
|
||||||
|
|
||||||
|
files_read_etc_files(alsa_t)
|
||||||
|
|
||||||
|
term_use_generic_pty(alsa_t)
|
||||||
|
|
||||||
|
libs_use_ld_so(alsa_t)
|
||||||
|
libs_use_shared_libs(alsa_t)
|
||||||
|
|
||||||
|
logging_send_syslog_msg(alsa_t)
|
||||||
|
|
||||||
|
miscfiles_read_localization(alsa_t)
|
||||||
|
|
||||||
|
userdom_manage_unpriv_user_semaphores(alsa_t)
|
||||||
|
userdom_manage_unpriv_user_shared_mem(alsa_t)
|
||||||
|
|
||||||
|
optional_policy(`nscd',`
|
||||||
|
nscd_use_socket(alsa_t)
|
||||||
|
')
|
@ -1648,6 +1648,39 @@ interface(`userdom_spec_domtrans_unpriv_users',`
|
|||||||
corecmd_shell_spec_domtrans($1,unpriv_userdomain)
|
corecmd_shell_spec_domtrans($1,unpriv_userdomain)
|
||||||
')
|
')
|
||||||
|
|
||||||
|
########################################
|
||||||
|
## <summary>
|
||||||
|
## Manage unpriviledged user SysV sempaphores.
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## Domain allowed access.
|
||||||
|
## </param>
|
||||||
|
#
|
||||||
|
interface(`userdom_manage_unpriv_user_semaphores',`
|
||||||
|
gen_require(`
|
||||||
|
attribute unpriv_userdomain;
|
||||||
|
')
|
||||||
|
|
||||||
|
allow $1 unpriv_userdomain:sem create_sem_perms;
|
||||||
|
')
|
||||||
|
|
||||||
|
########################################
|
||||||
|
## <summary>
|
||||||
|
## Manage unpriviledged user SysV shared
|
||||||
|
## memory segments.
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## Domain allowed access.
|
||||||
|
## </param>
|
||||||
|
#
|
||||||
|
interface(`userdom_manage_unpriv_user_shared_mem',`
|
||||||
|
gen_require(`
|
||||||
|
attribute unpriv_userdomain;
|
||||||
|
')
|
||||||
|
|
||||||
|
allow $1 unpriv_userdomain:shm create_shm_perms;
|
||||||
|
')
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
## <summary>
|
## <summary>
|
||||||
## Execute a shell in the sysadm domain.
|
## Execute a shell in the sysadm domain.
|
||||||
|
Loading…
Reference in New Issue
Block a user