From b8e72b1ff6ff0f3318a2c875d51ad4200d46f010 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Tue, 21 Jan 2020 13:08:13 +0100 Subject: [PATCH] sdm845-common: sepolicy: Address init denials Change-Id: Ib68ab9934cc3668eae004812c56692e2a5a010d2 --- sepolicy/private/file.te | 1 + sepolicy/private/init.te | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sepolicy/private/file.te b/sepolicy/private/file.te index 2179ee9..c036cd0 100644 --- a/sepolicy/private/file.te +++ b/sepolicy/private/file.te @@ -11,6 +11,7 @@ type sysfs_fod, sysfs_type, fs_type; type sysfs_fpc_proximity, sysfs_type, fs_type; type sysfs_graphics, sysfs_type, fs_type; type sysfs_oem, sysfs_type, fs_type; +type sysfs_usb_supply, sysfs_type, fs_type; # data type display_misc_file, file_type, data_file_type, core_data_file_type; diff --git a/sepolicy/private/init.te b/sepolicy/private/init.te index 9ef5b84..0ac4d95 100644 --- a/sepolicy/private/init.te +++ b/sepolicy/private/init.te @@ -6,3 +6,6 @@ allow init { sysfs_fpc_proximity sysfs_graphics }:file { open read setattr }; + +# Allow init to write to otg_switch +allow init sysfs_usb_supply:file w_file_perms;