android_system_sepolicy/public/hal_audio.te
Steven Moreland a25192262b haldomain: add hwbinder_use
All hals need to use hwbinder.

Test: no additional denials
Bug: 34180936
Change-Id: Ie92cdbd79fc75062c4afa4cda53cb57ccde7e370
2017-01-18 09:47:50 -08:00

37 lines
1.0 KiB
Plaintext

binder_use(hal_audio)
binder_call(hal_audio, audioserver)
binder_call(hal_audio, system_server)
hwallocator_use(hal_audio)
allow hal_audio ion_device:chr_file r_file_perms;
allow hal_audio system_file:dir { open read };
userdebug_or_eng(`
# used for pcm capture for debug.
allow hal_audio audiohal_data_file:dir create_dir_perms;
allow hal_audio audiohal_data_file:file create_file_perms;
')
r_dir_file(hal_audio, proc)
allow hal_audio audio_device:dir r_dir_perms;
allow hal_audio audio_device:chr_file rw_file_perms;
allow hal_audio scheduling_policy_service:service_manager find;
# Needed on some devices for playing audio on paired BT device,
# but seems appropriate for all devices.
unix_socket_connect(hal_audio, bluetooth, bluetooth)
###
### neverallow rules
###
# hal_audio should never execute any executable without
# a domain transition
neverallow hal_audio { file_type fs_type }:file execute_no_trans;
# hal_audio should never need network access.
# Disallow network sockets.
neverallow hal_audio domain:{ tcp_socket udp_socket rawip_socket } *;