audio:fix AAudio API access denial

This commit adds the sepolicy file for AAudio API

I auditd  : type=1400 audit(0.0:113):
avc: denied { map } for comm="binder:900_7" path="/dev/snd/pcmC0D0p"
dev="tmpfs" ino=1191 scontext=u:r:audioserver:s0
tcontext=u:object_r:audio_device:s0 tclass=chr_file permissive=1

Bug: 264484544
Test: test_steal_exclusive -c0
Test: Check no avc_deny on audioserver
Change-Id: I9efde74c74722b1b32c1d800a4cbceea8a850bfa
This commit is contained in:
millerliang 2023-01-07 22:30:17 +08:00
parent f4841acd83
commit 8889eb6496
2 changed files with 2 additions and 4 deletions

View file

@ -1,4 +0,0 @@
# b/264484544
userdebug_or_eng(`
permissive audioserver;
')

2
vendor/audioserver.te vendored Normal file
View file

@ -0,0 +1,2 @@
#allow access to ALSA MMAP FDs for AAudio API
allow audioserver audio_device:chr_file r_file_perms;