blob: 08cc1ff2aef5d6cf4a14264a82b3148aadae9ed3 [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
Mikhail Naganov80483852017-10-18 20:28:33 +000010r_dir_file(hal_audio, proc)
Tri Vo464f59a2017-10-06 10:20:53 -070011r_dir_file(hal_audio, proc_asound)
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070012allow hal_audio audio_device:dir r_dir_perms;
13allow hal_audio audio_device:chr_file rw_file_perms;
14
Mikhail Naganovd7c88dd2017-03-09 14:32:16 -080015# Needed to provide debug dump output via dumpsys' pipes.
16allow hal_audio shell:fd use;
17allow hal_audio shell:fifo_file write;
Mikhail Naganov9686cbc2017-05-04 13:25:52 -070018allow hal_audio dumpstate:fd use;
19allow hal_audio dumpstate:fifo_file write;
Mikhail Naganovd7c88dd2017-03-09 14:32:16 -080020
Haynes Mathew Georgeebc7b432018-02-27 16:21:27 -080021# allow hal audio to use vnbinder
22vndbinder_use(hal_audio)
23
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070024###
25### neverallow rules
26###
27
Alex Klyubinac2b4cd2017-02-13 14:40:49 -080028# Should never execute any executable without a domain transition
Jeff Vander Stoep6a28b682017-11-20 21:43:25 -080029neverallow hal_audio_server { file_type fs_type }:file execute_no_trans;
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070030
Alex Klyubinac2b4cd2017-02-13 14:40:49 -080031# Should never need network access.
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070032# Disallow network sockets.
Jeff Vander Stoep6a28b682017-11-20 21:43:25 -080033neverallow hal_audio_server domain:{ tcp_socket udp_socket rawip_socket } *;
Jeff Vander Stoep7fa59c82017-03-13 22:03:10 -070034
35# Only audio HAL may directly access the audio hardware
36neverallow { halserverdomain -hal_audio_server } audio_device:chr_file *;