blob: 6a436bd8e0edb4fa169d7c41578efa92d9c095a7 [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
Alex Klyubin53656c12017-04-13 19:05:27 -07005add_hwservice(hal_audio_server, hal_audio_hwservice)
6allow hal_audio_client hal_audio_hwservice:hwservice_manager find;
7
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -07008allow hal_audio ion_device:chr_file r_file_perms;
9
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070010userdebug_or_eng(`
11 # used for pcm capture for debug.
12 allow hal_audio audiohal_data_file:dir create_dir_perms;
13 allow hal_audio audiohal_data_file:file create_file_perms;
14')
15
16r_dir_file(hal_audio, proc)
Tri Vo464f59a2017-10-06 10:20:53 -070017r_dir_file(hal_audio, proc_asound)
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070018allow hal_audio audio_device:dir r_dir_perms;
19allow hal_audio audio_device:chr_file rw_file_perms;
20
Mikhail Naganovd7c88dd2017-03-09 14:32:16 -080021# Needed to provide debug dump output via dumpsys' pipes.
22allow hal_audio shell:fd use;
23allow hal_audio shell:fifo_file write;
Mikhail Naganov9686cbc2017-05-04 13:25:52 -070024allow hal_audio dumpstate:fd use;
25allow hal_audio dumpstate:fifo_file write;
Mikhail Naganovd7c88dd2017-03-09 14:32:16 -080026
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070027###
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 *;