diff --git a/sepolicy/common/file_contexts b/sepolicy/common/file_contexts index ff831fb..20956bf 100644 --- a/sepolicy/common/file_contexts +++ b/sepolicy/common/file_contexts @@ -53,5 +53,10 @@ /sys/bus/iio/devices(/.*)? u:object_r:sysfs_iio:s0 /sys/devices/[a-f0-9]+\.spi/spi_master/spi[0-9]+/spi[0-9]+\.0/iio:device[0-9](/.*)? u:object_r:sysfs_iio:s0 +# sysfs - leds +/sys/devices/i2c\.[0-9]+/i2c-[0-9]+/[0-9]+-[a-z0-9]+/leds(/.*)? u:object_r:sysfs_leds:s0 +/sys/devices/i2c\.[0-9]+/i2c-[0-9]+/[0-9]+-[a-z0-9]+/max[a-z0-9]+-led/leds(/.*)? u:object_r:sysfs_leds:s0 +/sys/devices/leds-qpnp-[0-9]+/leds(/.*)? u:object_r:sysfs_leds:s0 + # sysfs - mdnie /sys/devices/virtual/mdnie/mdnie(/.*)? u:object_r:sysfs_mdnie:s0 diff --git a/sepolicy/common/hal_sensors_default.te b/sepolicy/common/hal_sensors_default.te index 46b4d6f..ae7996e 100644 --- a/sepolicy/common/hal_sensors_default.te +++ b/sepolicy/common/hal_sensors_default.te @@ -1,6 +1,7 @@ allow hal_sensors_default { sysfs_batteryinfo sysfs_graphics + sysfs_leds }:dir search; allow hal_sensors_default { diff --git a/sepolicy/common/init.te b/sepolicy/common/init.te index 14cb253..25c93da 100644 --- a/sepolicy/common/init.te +++ b/sepolicy/common/init.te @@ -9,5 +9,6 @@ allow init { sysfs_graphics sysfs_iio sysfs_input + sysfs_leds sysfs_mdnie }:file setattr;