From 05e9a6545c7d3ca0be45fc9ca0fc1286c90d99c9 Mon Sep 17 00:00:00 2001 From: chrisweir Date: Wed, 11 Mar 2020 12:51:22 -0700 Subject: [PATCH] Enable CAN HAL to scan /sys/devices for USB CAN CAN HAL needs access to /sys/devices to search for USB serial numbers for SocketCAN devices and for USB serial devices. Bug: 142654031 Test: Manual + VTS Change-Id: I3d9bff94f8d8f936f7d859c01b9ff920fcbc5130 --- vendor/hal_can_socketcan.te | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vendor/hal_can_socketcan.te b/vendor/hal_can_socketcan.te index afa1311b2..74987883f 100644 --- a/vendor/hal_can_socketcan.te +++ b/vendor/hal_can_socketcan.te @@ -25,6 +25,8 @@ allowxperm hal_can_socketcan self:can_socket ioctl { # Un-publishing ICanBus interfaces allow hal_can_socketcan hidl_manager_hwservice:hwservice_manager find; +allow hal_can_socketcan sysfs:dir r_dir_perms; + allow hal_can_socketcan usb_serial_device:chr_file { ioctl read write open }; allowxperm hal_can_socketcan usb_serial_device:chr_file ioctl { TCGETS