summaryrefslogtreecommitdiff
path: root/sepolicy
diff options
context:
space:
mode:
authorChirayu Desai <chirayudesai1@gmail.com>2015-01-15 20:36:24 +0530
committerChirayu Desai <chirayudesai1@gmail.com>2015-02-02 16:48:34 +0530
commit8b50e6f82c76867381dc9a423e0f1b954f119783 (patch)
tree394c7d1028bbce2fe94d38a2519659943376cd33 /sepolicy
parent7965015cd9627802ebe7201184f54d59643578b5 (diff)
Add SELinux policy for the TFA amp service
Change-Id: I698f56bca42ffef6e83f46dbdf6e8b798267028a
Diffstat (limited to 'sepolicy')
-rw-r--r--sepolicy/file_contexts5
-rw-r--r--sepolicy/tfa_amp.te8
2 files changed, 11 insertions, 2 deletions
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;