blob: a51f38212117d9c418e38cfdf12bdf58dc1b0403 [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
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -07005allow hal_audio ion_device:chr_file r_file_perms;
6
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -07007userdebug_or_eng(`
8 # used for pcm capture for debug.
9 allow hal_audio audiohal_data_file:dir create_dir_perms;
10 allow hal_audio audiohal_data_file:file create_file_perms;
11')
12
13r_dir_file(hal_audio, proc)
14allow hal_audio audio_device:dir r_dir_perms;
15allow hal_audio audio_device:chr_file rw_file_perms;
16
Mikhail Naganovd7c88dd2017-03-09 14:32:16 -080017# Needed to provide debug dump output via dumpsys' pipes.
18allow hal_audio shell:fd use;
19allow hal_audio shell:fifo_file write;
Mikhail Naganov9686cbc2017-05-04 13:25:52 -070020allow hal_audio dumpstate:fd use;
21allow hal_audio dumpstate:fifo_file write;
Mikhail Naganovd7c88dd2017-03-09 14:32:16 -080022
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070023# Needed on some devices for playing audio on paired BT device,
24# but seems appropriate for all devices.
25unix_socket_connect(hal_audio, bluetooth, bluetooth)
26
27###
28### neverallow rules
29###
30
Alex Klyubinac2b4cd2017-02-13 14:40:49 -080031# Should never execute any executable without a domain transition
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070032neverallow hal_audio { file_type fs_type }:file execute_no_trans;
33
Alex Klyubinac2b4cd2017-02-13 14:40:49 -080034# Should never need network access.
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070035# Disallow network sockets.
36neverallow hal_audio domain:{ tcp_socket udp_socket rawip_socket } *;
Jeff Vander Stoep7fa59c82017-03-13 22:03:10 -070037
38# Only audio HAL may directly access the audio hardware
39neverallow { halserverdomain -hal_audio_server } audio_device:chr_file *;