From 9e04bd90cce737ea78068a7d81f699111685a553 Mon Sep 17 00:00:00 2001 From: Peng Qi Date: Sat, 18 Jan 2020 09:39:50 +0800 Subject: [PATCH] [ALPS03893095] Selinux: MTK BT HAL [Detail] AOSP has defined neverallow rules to restrict direct access to system files. [Solution] Since MTK does not use "/data/misc/bluedroid/" to store BT address. It should be alright to remove this kind of thing. MTK-Commit-Id: 5b3aae9aebd39c24a3846c27c7ca9fceda9513d3 Change-Id: I5a8420e9f5259259b2bd11a6da033a140f0bea7c CR-Id: ALPS03893095 Feature: BT Chipset Capability --- non_plat/mtk_hal_bluetooth.te | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/non_plat/mtk_hal_bluetooth.te b/non_plat/mtk_hal_bluetooth.te index 55c221f..c334e84 100644 --- a/non_plat/mtk_hal_bluetooth.te +++ b/non_plat/mtk_hal_bluetooth.te @@ -14,9 +14,6 @@ r_dir_file(mtk_hal_bluetooth, bluetooth_efs_file) allow mtk_hal_bluetooth { uhid_device hci_attach_dev }:chr_file rw_file_perms; -# Access to config files to look for a Bluetooth address -r_dir_file(mtk_hal_bluetooth, bluetooth_data_file) - # sysfs access. r_dir_file(mtk_hal_bluetooth, sysfs_type) allow mtk_hal_bluetooth sysfs_bluetooth_writable:file rw_file_perms; @@ -29,14 +26,7 @@ set_prop(mtk_hal_bluetooth, bluetooth_prop) allow mtk_hal_bluetooth proc_bluetooth_writable:file rw_file_perms; # VTS tests need to be able to toggle rfkill -userdebug_or_eng(` - allow mtk_hal_bluetooth self:capability net_admin; -') - -# Logging for backward compatibility -typeattribute mtk_hal_bluetooth data_between_core_and_vendor_violators; -allow mtk_hal_bluetooth bluetooth_data_file:dir ra_dir_perms; -allow mtk_hal_bluetooth bluetooth_data_file:file create_file_perms; +allow mtk_hal_bluetooth self:capability net_admin; # Purpose : Set to access stpbt driver & NVRAM allow mtk_hal_bluetooth stpbt_device:chr_file rw_file_perms;