blob: b3ca73c8d1313eff9ce8581913ef02bf9b5bd553 [file] [log] [blame]
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -07001# hal_audio - audio services daemon
2type hal_audio, domain;
3type hal_audio_exec, exec_type, file_type;
4
5hwbinder_use(hal_audio)
6binder_call(hal_audio, audioserver)
7
8allow hal_audio ion_device:chr_file r_file_perms;
9
10allow hal_audio system_file:dir { open read };
11
12userdebug_or_eng(`
13 # used for pcm capture for debug.
14 allow hal_audio audiohal_data_file:dir create_dir_perms;
15 allow hal_audio audiohal_data_file:file create_file_perms;
16')
17
18r_dir_file(hal_audio, proc)
19allow hal_audio audio_device:dir r_dir_perms;
20allow hal_audio audio_device:chr_file rw_file_perms;
21
22# Needed on some devices for playing audio on paired BT device,
23# but seems appropriate for all devices.
24unix_socket_connect(hal_audio, bluetooth, bluetooth)
25
26###
27### neverallow rules
28###
29
30# hal_audio should never execute any executable without
31# a domain transition
32neverallow hal_audio { file_type fs_type }:file execute_no_trans;
33
34# hal_audio should never need network access.
35# Disallow network sockets.
36neverallow hal_audio domain:{ tcp_socket udp_socket rawip_socket } *;