2017-02-13 14:40:49 -08:00
|
|
|
# HwBinder IPC from client to server, and callbacks
|
|
|
|
binder_call(hal_audio_client, hal_audio_server)
|
|
|
|
binder_call(hal_audio_server, hal_audio_client)
|
|
|
|
|
2017-04-13 19:05:27 -07:00
|
|
|
add_hwservice(hal_audio_server, hal_audio_hwservice)
|
|
|
|
allow hal_audio_client hal_audio_hwservice:hwservice_manager find;
|
|
|
|
|
2016-10-25 12:42:39 -07:00
|
|
|
allow hal_audio ion_device:chr_file r_file_perms;
|
|
|
|
|
|
|
|
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;
|
|
|
|
')
|
|
|
|
|
2017-10-06 10:20:53 -07:00
|
|
|
r_dir_file(hal_audio, proc_asound)
|
2016-10-25 12:42:39 -07:00
|
|
|
allow hal_audio audio_device:dir r_dir_perms;
|
|
|
|
allow hal_audio audio_device:chr_file rw_file_perms;
|
|
|
|
|
2017-03-09 14:32:16 -08:00
|
|
|
# Needed to provide debug dump output via dumpsys' pipes.
|
|
|
|
allow hal_audio shell:fd use;
|
|
|
|
allow hal_audio shell:fifo_file write;
|
2017-05-04 13:25:52 -07:00
|
|
|
allow hal_audio dumpstate:fd use;
|
|
|
|
allow hal_audio dumpstate:fifo_file write;
|
2017-03-09 14:32:16 -08:00
|
|
|
|
2016-10-25 12:42:39 -07:00
|
|
|
###
|
|
|
|
### neverallow rules
|
|
|
|
###
|
|
|
|
|
2017-02-13 14:40:49 -08:00
|
|
|
# Should never execute any executable without a domain transition
|
2016-10-25 12:42:39 -07:00
|
|
|
neverallow hal_audio { file_type fs_type }:file execute_no_trans;
|
|
|
|
|
2017-02-13 14:40:49 -08:00
|
|
|
# Should never need network access.
|
2016-10-25 12:42:39 -07:00
|
|
|
# Disallow network sockets.
|
|
|
|
neverallow hal_audio domain:{ tcp_socket udp_socket rawip_socket } *;
|
2017-03-13 22:03:10 -07:00
|
|
|
|
|
|
|
# Only audio HAL may directly access the audio hardware
|
|
|
|
neverallow { halserverdomain -hal_audio_server } audio_device:chr_file *;
|