From 4a67b5eb26edb4b585ffcddb843ca96d41813aaa Mon Sep 17 00:00:00 2001 From: raghavt20 Date: Sat, 19 Jun 2021 14:32:45 +0530 Subject: [PATCH] sm6150-common: sepolicy: Label Spi IR node Change-Id: I550e823b11bbc8e37cffa164a2047d57d8a5499a Signed-off-by: raghavt20 --- sepolicy/vendor/device.te | 1 + sepolicy/vendor/file_contexts | 3 +++ sepolicy/vendor/hal_ir_default.te | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 sepolicy/vendor/device.te create mode 100644 sepolicy/vendor/hal_ir_default.te diff --git a/sepolicy/vendor/device.te b/sepolicy/vendor/device.te new file mode 100644 index 0000000..d580073 --- /dev/null +++ b/sepolicy/vendor/device.te @@ -0,0 +1 @@ +type lirc_device, dev_type; diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index b2b6865..7899d78 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -29,6 +29,9 @@ /vendor/bin/hw/android\.hardware\.power-service\.xiaomi-libperfmgr u:object_r:hal_power_default_exec:s0 /vendor/bin/hw/vendor\.lineage\.livedisplay@2\.1-service\.xiaomi_sm6150 u:object_r:hal_lineage_livedisplay_qti_exec:s0 +# IR +/dev/spidev[0-9]\.1 u:object_r:lirc_device:s0 + # Remosaic /vendor/bin/remosaic_daemon u:object_r:remosaic_daemon_exec:s0 diff --git a/sepolicy/vendor/hal_ir_default.te b/sepolicy/vendor/hal_ir_default.te new file mode 100644 index 0000000..fabc5c1 --- /dev/null +++ b/sepolicy/vendor/hal_ir_default.te @@ -0,0 +1,2 @@ +allow hal_ir_default lirc_device:chr_file rw_file_perms; +allow hal_ir_default lirc_device:file rw_file_perms;