From 7bdcdf733eec74b20a9c32ad63ef2c44119705ae Mon Sep 17 00:00:00 2001 From: "Kevin F. Haggerty" Date: Fri, 30 Nov 2018 14:09:23 -0700 Subject: [PATCH] msm8226-common: sepolicy: Label sysfs_usb_otg, resolve denials * avc: denied { setattr } for name="booster" dev="sysfs" ino=23129 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_usb_otg:s0 tclass=file permissive=1 Change-Id: Iffb33bd7647026107473fb63e82d942ad027f9f9 --- sepolicy/common/file.te | 1 + sepolicy/common/file_contexts | 3 +++ sepolicy/common/init.te | 1 + 3 files changed, 5 insertions(+) diff --git a/sepolicy/common/file.te b/sepolicy/common/file.te index 52a6e4b..5617fd4 100644 --- a/sepolicy/common/file.te +++ b/sepolicy/common/file.te @@ -15,6 +15,7 @@ type sysfs_sec_switch, fs_type, sysfs_type; type sysfs_sec_thermistor, fs_type, sysfs_type; type sysfs_sec_touchkey, fs_type, sysfs_type; type sysfs_sec_tsp, fs_type, sysfs_type; +type sysfs_usb_otg, fs_type, sysfs_type; type sysfs_wifi_writeable, fs_type, sysfs_type; type bt_fw_file, file_type; diff --git a/sepolicy/common/file_contexts b/sepolicy/common/file_contexts index 628b667..6bd2675 100644 --- a/sepolicy/common/file_contexts +++ b/sepolicy/common/file_contexts @@ -84,3 +84,6 @@ # sysfs - sensors /sys/devices/virtual/sensors(/.*)? u:object_r:sysfs_sensors:s0 + +# sysfs - usb +/sys/devices/virtual/host_notify/usb_otg(/.*)? u:object_r:sysfs_usb_otg:s0 diff --git a/sepolicy/common/init.te b/sepolicy/common/init.te index 2d26f67..decb049 100644 --- a/sepolicy/common/init.te +++ b/sepolicy/common/init.te @@ -28,6 +28,7 @@ allow init { sysfs_sec_tsp sysfs_sensors sysfs_socinfo + sysfs_usb_otg }:file setattr; allow init {