blob: f620562945a55a89eb1a3635eeb78f7380b175ae [file] [log] [blame]
Alex Klyubinac2b4cd2017-02-13 14:40:49 -08001# HwBinder IPC from client to server, and callbacks
2binder_call(hal_audio_client, hal_audio_server)
3binder_call(hal_audio_server, hal_audio_client)
4
5# Both client and the server need to use hwallocator
6hwallocator_use(hal_audio_client)
7hwallocator_use(hal_audio_server)
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -07008
9allow hal_audio ion_device:chr_file r_file_perms;
10
11allow hal_audio system_file:dir { open read };
12
13userdebug_or_eng(`
14 # used for pcm capture for debug.
15 allow hal_audio audiohal_data_file:dir create_dir_perms;
16 allow hal_audio audiohal_data_file:file create_file_perms;
17')
18
19r_dir_file(hal_audio, proc)
20allow hal_audio audio_device:dir r_dir_perms;
21allow hal_audio audio_device:chr_file rw_file_perms;
22
Mikhail Naganovd7c88dd2017-03-09 14:32:16 -080023# Needed to provide debug dump output via dumpsys' pipes.
24allow hal_audio shell:fd use;
25allow hal_audio shell:fifo_file write;
26
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070027# Needed on some devices for playing audio on paired BT device,
28# but seems appropriate for all devices.
29unix_socket_connect(hal_audio, bluetooth, bluetooth)
30
31###
32### neverallow rules
33###
34
Alex Klyubinac2b4cd2017-02-13 14:40:49 -080035# Should never execute any executable without a domain transition
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070036neverallow hal_audio { file_type fs_type }:file execute_no_trans;
37
Alex Klyubinac2b4cd2017-02-13 14:40:49 -080038# Should never need network access.
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070039# Disallow network sockets.
40neverallow hal_audio domain:{ tcp_socket udp_socket rawip_socket } *;