From 3a7647d59cc9e28a396d44d63ba88aaa87e69b59 Mon Sep 17 00:00:00 2001 From: Ray Chi Date: Wed, 14 Dec 2022 15:38:22 +0800 Subject: [PATCH] [DO NOT MERGE] usb: Add sepolicy for extcon access USB gadget hal will access extcon folder so that this patch will add new rule to allow USB gadget hal to access extcon. Bug: 263435622 Test: build pass Change-Id: I971732c6a40700a85df61170dcf1c3660307b96c (cherry picked from commit 03fb0f6ceb6bfee492299b9d5a5578f5b2f50822) Merged-In: I971732c6a40700a85df61170dcf1c3660307b96c --- whitechapel_pro/hal_usb_gadget_impl.te | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/whitechapel_pro/hal_usb_gadget_impl.te b/whitechapel_pro/hal_usb_gadget_impl.te index ddda7eb9..361e0f71 100644 --- a/whitechapel_pro/hal_usb_gadget_impl.te +++ b/whitechapel_pro/hal_usb_gadget_impl.te @@ -19,3 +19,7 @@ allow hal_usb_gadget_impl proc_irq:file w_file_perms; # allow gadget hal to search hsi2c dir and write to usb_limit_accessory_enable/current allow hal_usb_gadget_impl sysfs_batteryinfo:dir r_dir_perms; allow hal_usb_gadget_impl sysfs_batteryinfo:file rw_file_perms; + +# allow gadget hal to access extcon node +allow hal_usb_gadget_impl sysfs_extcon:dir search; +allow hal_usb_gadget_impl sysfs_extcon:file r_file_perms;