From 8b50e6f82c76867381dc9a423e0f1b954f119783 Mon Sep 17 00:00:00 2001 From: Chirayu Desai Date: Thu, 15 Jan 2015 20:36:24 +0530 Subject: Add SELinux policy for the TFA amp service Change-Id: I698f56bca42ffef6e83f46dbdf6e8b798267028a --- BoardConfigCommon.mk | 3 ++- sepolicy/file_contexts | 5 +++-- sepolicy/tfa_amp.te | 8 ++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 sepolicy/tfa_amp.te diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 3b5730e..059f5b0 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -62,7 +62,8 @@ BOARD_SEPOLICY_DIRS += \ device/sony/shinano-common/sepolicy BOARD_SEPOLICY_UNION += \ - mlog_qmi.te + mlog_qmi.te \ + tfa_amp.te # Wifi WPA_SUPPLICANT_VERSION := VER_0_8_X diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 79a08ec..ecc8452 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -1,8 +1,9 @@ # NFC -/dev/pn547 u:object_r:nfc_device:s0 +/dev/pn547 u:object_r:nfc_device:s0 # Audio -/dev/tfa98xx u:object_r:audio_device:s0 +/dev/tfa98xx u:object_r:audio_device:s0 +/system/bin/tfa9890_amp u:object_r:tfa_amp_exec:s0 # Modem /system/bin/mlog_qmi_service u:object_r:mlog_qmi_exec:s0 diff --git a/sepolicy/tfa_amp.te b/sepolicy/tfa_amp.te new file mode 100644 index 0000000..9191e40 --- /dev/null +++ b/sepolicy/tfa_amp.te @@ -0,0 +1,8 @@ +type tfa_amp, domain; +type tfa_amp_exec, exec_type, file_type; + +# Started by init +init_daemon_domain(tfa_amp) + +# Access to /dev/tfa98xx +allow tfa_amp audio_device:chr_file rw_file_perms; -- cgit v1.2.3