From 97b3076919a3f58a86019d6861a121511b8332ca Mon Sep 17 00:00:00 2001 From: Cosmin Tanislav Date: Thu, 21 Oct 2021 15:00:05 +0300 Subject: [PATCH] sm8350-common: sepolicy: add rules for elliptic proximity --- sepolicy/vendor/file_contexts | 4 ++++ sepolicy/vendor/hal_audio_default.te | 6 ++++++ sepolicy/vendor/hal_sensors_default.te | 2 ++ 3 files changed, 12 insertions(+) create mode 100644 sepolicy/vendor/hal_sensors_default.te diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index 9543f15..a654f32 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -1,3 +1,7 @@ +# Audio +/dev/socket/audio_hw_socket u:object_r:audio_socket:s0 +/dev/elliptic(.*)? u:object_r:sound_device:s0 + # Battery /vendor/bin/batteryd u:object_r:batteryd_exec:s0 /vendor/bin/batterysecret u:object_r:batterysecret_exec:s0 diff --git a/sepolicy/vendor/hal_audio_default.te b/sepolicy/vendor/hal_audio_default.te index 24cab04..97a9154 100644 --- a/sepolicy/vendor/hal_audio_default.te +++ b/sepolicy/vendor/hal_audio_default.te @@ -1 +1,7 @@ +type audio_socket, file_type; +type sound_device, dev_type; + set_prop(hal_audio_default, vendor_audio_prop) + +allow hal_audio_default audio_socket:sock_file rw_file_perms; +allow hal_audio_default sound_device:chr_file rw_file_perms; diff --git a/sepolicy/vendor/hal_sensors_default.te b/sepolicy/vendor/hal_sensors_default.te new file mode 100644 index 0000000..7f6a35b --- /dev/null +++ b/sepolicy/vendor/hal_sensors_default.te @@ -0,0 +1,2 @@ +allow hal_sensors_default audio_socket:sock_file rw_file_perms; +allow hal_sensors_default sound_device:chr_file rw_file_perms;