summaryrefslogtreecommitdiffstats
path: root/msm8960
diff options
context:
space:
mode:
authoranallu <anallu@codeaurora.org>2015-10-23 12:15:51 -0700
committerphanendra yarra <pyarra@codeaurora.org>2015-10-28 18:45:48 +0530
commit630210ad87996363e51adb7e27e9c7a00b395a7a (patch)
treefdf4152571e7a599234df5a0365294ccb59792c5 /msm8960
parent901889a11d179597c9311900f66959d0130f1c4a (diff)
downloadandroid_device_qcom_sepolicy-630210ad87996363e51adb7e27e9c7a00b395a7a.tar.gz
android_device_qcom_sepolicy-630210ad87996363e51adb7e27e9c7a00b395a7a.tar.bz2
android_device_qcom_sepolicy-630210ad87996363e51adb7e27e9c7a00b395a7a.zip
SELINUX: Add SELINUX permissions for gps
GPS HLOS driver need to open gss device in order to start PIL loading for GSS device, hence need to enabled permissions for this device Change-Id: I5cb2d8a2cf8e754e9d9f8baa750745a69a3bca7d
Diffstat (limited to 'msm8960')
-rwxr-xr-xmsm8960/device.te3
-rwxr-xr-xmsm8960/file_contexts2
-rw-r--r--msm8960/location.te29
-rw-r--r--msm8960/system_server.te3
4 files changed, 37 insertions, 0 deletions
diff --git a/msm8960/device.te b/msm8960/device.te
index 24d277a0..c49ff00d 100755
--- a/msm8960/device.te
+++ b/msm8960/device.te
@@ -1,2 +1,5 @@
#mdm helper device
type mdm_device, dev_type;
+
+#device type for gss device nodes, ie /dev/gss
+type gss_device, dev_type;
diff --git a/msm8960/file_contexts b/msm8960/file_contexts
index f90ff1ce..653d84b3 100755
--- a/msm8960/file_contexts
+++ b/msm8960/file_contexts
@@ -9,6 +9,7 @@
/dev/block/bootdevice/by-name/m9kefs2 u:object_r:efs_boot_dev:s0
/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
###################################
# System files
@@ -16,6 +17,7 @@
/system/bin/thermald 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
###################################
# Data files
diff --git a/msm8960/location.te b/msm8960/location.te
new file mode 100644
index 00000000..67ce6800
--- /dev/null
+++ b/msm8960/location.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.
+
+#For gss device
+allow location gss_device:chr_file rw_file_perms;
diff --git a/msm8960/system_server.te b/msm8960/system_server.te
index 1ac7260e..0185b373 100644
--- a/msm8960/system_server.te
+++ b/msm8960/system_server.te
@@ -1,2 +1,5 @@
# WifiStateMachine to access wpa_wlan0 socket
allow system_server init:unix_dgram_socket sendto;
+
+#For gss
+allow system_server gss_device:chr_file rw_file_perms;