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;
|
|
|
|
|
2017-10-18 22:28:33 +02:00
|
|
|
r_dir_file(hal_audio, proc)
|
2017-10-06 19:20:53 +02:00
|
|
|
r_dir_file(hal_audio, proc_asound)
|
2017-10-30 20:58:20 +01:00
|
|
|
allow hal_audio_server audio_device:dir r_dir_perms;
|
|
|
|
allow hal_audio_server audio_device:chr_file rw_file_perms;
|
2016-10-25 21:42:39 +02:00
|
|
|
|
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
|
|
|
|
2018-02-28 01:21:27 +01:00
|
|
|
# allow hal audio to use vnbinder
|
|
|
|
vndbinder_use(hal_audio)
|
|
|
|
|
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
|
2017-11-21 06:43:25 +01:00
|
|
|
neverallow hal_audio_server { file_type fs_type }:file execute_no_trans;
|
2016-10-25 21:42:39 +02:00
|
|
|
|
2017-02-13 23:40:49 +01:00
|
|
|
# Should never need network access.
|
2016-10-25 21:42:39 +02:00
|
|
|
# Disallow network sockets.
|
2017-11-21 06:43:25 +01:00
|
|
|
neverallow hal_audio_server 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 *;
|
2018-04-09 05:07:32 +02:00
|
|
|
|
|
|
|
get_prop(hal_audio, bluetooth_a2dp_offload_prop)
|