summaryrefslogtreecommitdiffstats
path: root/msm8960
diff options
context:
space:
mode:
authorVenumadhav Cheryala <cvenum@codeaurora.org>2015-10-28 18:02:23 -0700
committerVenumadhav Cheryala <cvenum@codeaurora.org>2015-11-01 21:53:42 -0800
commitf71e4273f1f28eaac11d89fed584b23b6b6bab61 (patch)
tree982b9be9ae5c74a0b2b0607e57eadaeab6c76a01 /msm8960
parentb0998df510a6e79ca72f51404211c0aeb657a660 (diff)
downloadandroid_device_qcom_sepolicy-f71e4273f1f28eaac11d89fed584b23b6b6bab61.tar.gz
android_device_qcom_sepolicy-f71e4273f1f28eaac11d89fed584b23b6b6bab61.tar.bz2
android_device_qcom_sepolicy-f71e4273f1f28eaac11d89fed584b23b6b6bab61.zip
msm8960: Add thermal daemon changes,rmt storage mount points and removed rmt_storage
Thermal daemon requires mpdecision socket to be opened Add new socket for mpdecision. Add new property files for thermal. modemtst1,modemtst2,fsg will fail to mount with SElinux. add the partitions in file_context. Change-Id: I8ef5da0dc6090d60eb91561e52a77f85ac3ab8c8
Diffstat (limited to 'msm8960')
-rw-r--r--msm8960/file.te28
-rwxr-xr-xmsm8960/file_contexts8
-rw-r--r--msm8960/init_shell.te32
-rw-r--r--msm8960/property.te29
-rw-r--r--msm8960/property_contexts1
-rw-r--r--msm8960/rmt_storage.te5
-rw-r--r--msm8960/thermal-engine.te31
7 files changed, 128 insertions, 6 deletions
diff --git a/msm8960/file.te b/msm8960/file.te
index e5cea972..e8a78cc5 100644
--- a/msm8960/file.te
+++ b/msm8960/file.te
@@ -1,2 +1,30 @@
+# Copyright (c) 2015, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+
#efs file types
type efs_data_file, file_type, data_file_type;
+type mpdecision_socket, file_type;
diff --git a/msm8960/file_contexts b/msm8960/file_contexts
index 653d84b3..877f6bbc 100755
--- a/msm8960/file_contexts
+++ b/msm8960/file_contexts
@@ -10,11 +10,17 @@
/dev/block/bootdevice/by-name/m9kefs3 u:object_r:efs_boot_dev:s0
/dev/block/bootdevice/by-name/m9kefsc u:object_r:efs_boot_dev:s0
/dev/gss u:object_r:gss_device:s0
-
+/dev/block/platform/msm_sdcc.1/by-name/fsg u:object_r:modem_efs_partition_device:s0
+/dev/block/platform/msm_sdcc.1/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
+/dev/block/platform/msm_sdcc.1/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
+/dev/block/platform/msm_sdcc.1/by-name/ssd u:object_r:ssd_device:s0
+/dev/block/mmcblk0 u:object_r:root_block_device:s0
+/dev/socket/mpdecision u:object_r:mpdecision_socket:s0
###################################
# System files
#
/system/bin/thermald u:object_r:thermal-engine_exec:s0
+/system/bin/thermal-engine u:object_r:thermal-engine_exec:s0
/system/bin/qcks u:object_r:mdm_helper_exec:s0
/system/bin/efks u:object_r:mdm_helper_exec:s0
/system/bin/DR_AP_Service u:object_r:location_exec:s0
diff --git a/msm8960/init_shell.te b/msm8960/init_shell.te
new file mode 100644
index 00000000..a58c8b6f
--- /dev/null
+++ b/msm8960/init_shell.te
@@ -0,0 +1,32 @@
+# Copyright (c) 2015, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+
+#For property starting with hw
+#ctl_thermal-engine_prop - for access the thermal-engine
+allow qti_init_shell {
+ ctl_thermal-engine_prop
+}:property_service set;
diff --git a/msm8960/property.te b/msm8960/property.te
new file mode 100644
index 00000000..cba96b2a
--- /dev/null
+++ b/msm8960/property.te
@@ -0,0 +1,29 @@
+# Copyright (c) 2015, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+
+#property for thermal daemon
+type ctl_thermal-engine_prop, property_type;
diff --git a/msm8960/property_contexts b/msm8960/property_contexts
new file mode 100644
index 00000000..bb3c9d52
--- /dev/null
+++ b/msm8960/property_contexts
@@ -0,0 +1 @@
+ctl.thermal-engine u:object_r:ctl_thermal-engine_prop:s0
diff --git a/msm8960/rmt_storage.te b/msm8960/rmt_storage.te
deleted file mode 100644
index 3b3bbb29..00000000
--- a/msm8960/rmt_storage.te
+++ /dev/null
@@ -1,5 +0,0 @@
-# rmt_storage - rmt_storage daemon
-allow rmt_storage rpmb_device:blk_file { open read };
-allow rmt_storage ssd_device:blk_file { open read write };
-unix_socket_connect(rmt_storage, property, init)
-allow rmt_storage ctl_default_prop:property_service set;
diff --git a/msm8960/thermal-engine.te b/msm8960/thermal-engine.te
index 85c93f16..bc7bfc8e 100644
--- a/msm8960/thermal-engine.te
+++ b/msm8960/thermal-engine.te
@@ -1,2 +1,33 @@
+# Copyright (c) 2015, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+
allow thermal-engine self:netlink_kobject_uevent_socket { create read setopt bind };
allow thermal-engine socket_device:dir w_dir_perms;
+
+#connect to mpdecision
+unix_socket_connect(thermal-engine, mpdecision, mpdecision)
+allow thermal-engine self:capability net_admin;