2017-02-13 23:40:49 +01:00
|
|
|
# HwBinder IPC from client to server, and callbacks
|
|
|
|
binder_call(hal_audio_client, hal_audio_server)
|
|
|
|
binder_call(hal_audio_server, hal_audio_client)
|
|
|
|
|
2017-04-14 04:05:27 +02:00
|
|
|
add_hwservice(hal_audio_server, hal_audio_hwservice)
|
|
|
|
allow hal_audio_client hal_audio_hwservice:hwservice_manager find;
|
|
|
|
|
2016-10-25 21:42:39 +02:00
|
|
|
allow hal_audio ion_device:chr_file r_file_perms;
|
|
|
|
|
|
|
|
userdebug_or_eng(`
|
|
|
|
# used for pcm capture for debug.
|
|
|
|
allow hal_audio audiohal_data_file:dir create_dir_perms;
|
|
|
|
allow hal_audio audiohal_data_file:file create_file_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
r_dir_file(hal_audio, proc)
|
2017-09-26 21:58:29 +02:00
|
|
|
r_dir_file(hal_audio, proc_asound_cards)
|
2016-10-25 21:42:39 +02:00
|
|
|
allow hal_audio audio_device:dir r_dir_perms;
|
|
|
|
allow hal_audio audio_device:chr_file rw_file_perms;
|
|
|
|
|
2017-03-09 23:32:16 +01:00
|
|
|
# Needed to provide debug dump output via dumpsys' pipes.
|
|
|
|
allow hal_audio shell:fd use;
|
|
|
|
allow hal_audio shell:fifo_file write;
|
2017-05-04 22:25:52 +02:00
|
|
|
allow hal_audio dumpstate:fd use;
|
|
|
|
allow hal_audio dumpstate:fifo_file write;
|
2017-03-09 23:32:16 +01:00
|
|
|
|
2016-10-25 21:42:39 +02:00
|
|
|
###
|
|
|
|
### neverallow rules
|
|
|
|
###
|
|
|
|
|
2017-02-13 23:40:49 +01:00
|
|
|
# Should never execute any executable without a domain transition
|
2016-10-25 21:42:39 +02:00
|
|
|
neverallow hal_audio { file_type fs_type }:file execute_no_trans;
|
|
|
|
|
2017-02-13 23:40:49 +01:00
|
|
|
# Should never need network access.
|
2016-10-25 21:42:39 +02:00
|
|
|
# Disallow network sockets.
|
|
|
|
neverallow hal_audio domain:{ tcp_socket udp_socket rawip_socket } *;
|
2017-03-14 06:03:10 +01:00
|
|
|
|
|
|
|
# Only audio HAL may directly access the audio hardware
|
|
|
|
neverallow { halserverdomain -hal_audio_server } audio_device:chr_file *;
|