diff options
author | Brent Hronik <bhronik@codeaurora.org> | 2013-12-17 12:28:23 -0700 |
---|---|---|
committer | Avijit Kanti Das <avijitnsec@codeaurora.org> | 2014-07-24 02:21:12 -0700 |
commit | 6a6ca233fb273d0adf04f2d84a614b23828c8161 (patch) | |
tree | 322c881cc4d93ecaa8d04870be5e0596aa346574 /test | |
parent | 9bd586d4d555babba0d6cfb01e0ec9a90109d4bd (diff) | |
download | android_device_qcom_sepolicy-6a6ca233fb273d0adf04f2d84a614b23828c8161.tar.gz android_device_qcom_sepolicy-6a6ca233fb273d0adf04f2d84a614b23828c8161.tar.bz2 android_device_qcom_sepolicy-6a6ca233fb273d0adf04f2d84a614b23828c8161.zip |
sepolicy: Add smd device contexts and rules
Add the contexts for smd devices as well as the rules for smd pkt and
tty loopback modules.
Change-Id: Ie2ac21a4a8e67bd066a80274b39e99361ad9f698
Diffstat (limited to 'test')
-rw-r--r-- | test/file_contexts | 1 | ||||
-rw-r--r-- | test/smd_test.te | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/test/file_contexts b/test/file_contexts new file mode 100644 index 00000000..676b7ab1 --- /dev/null +++ b/test/file_contexts @@ -0,0 +1 @@ +/system/bin/kernel-tests/smd.* u:object_r:smd_test_exec:s0 diff --git a/test/smd_test.te b/test/smd_test.te new file mode 100644 index 00000000..2ad4a96c --- /dev/null +++ b/test/smd_test.te @@ -0,0 +1,14 @@ +#must be defined for file_contexts +type smd_test_exec, exec_type, file_type; + +userdebug_or_eng(` + type smd_test, domain; + domain_auto_trans(shell, smd_test_exec, smd_test) + domain_auto_trans(su, smd_test_exec, smd_test) + domain_auto_trans(adbd, smd_test_exec, smd_test) + #SMD device node and test file contexts + allow smd_test smd_device:chr_file {ioctl read write open getattr append}; + #tests are launched from pseudo terminal, so output will be directed there + #and as such needs adequate allow rules + allow smd_test devpts:chr_file {ioctl read write open getattr}; +') |