From 167d38272838ba72765dca529e97192e61475fb1 Mon Sep 17 00:00:00 2001 From: Demon000 Date: Wed, 4 Mar 2020 00:55:46 +0100 Subject: [PATCH] davinci: sepolicy: Add audio rules Change-Id: I5da3edd3525831412d5eec131dcfa02dc88053ab --- sepolicy/vendor/file_contexts | 3 +++ sepolicy/vendor/hal_audio_default.te | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 sepolicy/vendor/hal_audio_default.te diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index 86fdbde..a4b9dd6 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -1,3 +1,6 @@ +# Audio +/dev/socket/audio_hw_socket u:object_r:audio_socket:s0 + # HALs /vendor/bin/hw/android\.hardware\.light@2\.0-service\.davinci u:object_r:hal_light_default_exec:s0 diff --git a/sepolicy/vendor/hal_audio_default.te b/sepolicy/vendor/hal_audio_default.te new file mode 100644 index 0000000..412fbca --- /dev/null +++ b/sepolicy/vendor/hal_audio_default.te @@ -0,0 +1,8 @@ +type audio_socket, file_type; + +allow hal_audio_default mnt_vendor_file:dir search; +r_dir_file(hal_audio_default, persist_audio_file) + +set_prop(hal_audio_default, vendor_audio_prop) + +allow hal_audio_default audio_socket:sock_file rw_file_perms;