From c967ee5dc3b800b6b842de0b4051fc2ca371b3f6 Mon Sep 17 00:00:00 2001 From: Wilson Sung Date: Tue, 21 Nov 2023 11:53:28 +0000 Subject: [PATCH] Move sg_device related policy Bug: 312143882 Test: make selinux_policy Change-Id: I68b00a6577a01cf04f67b6b277bce6fe1faef618 --- legacy/whitechapel_pro/device.te | 1 - legacy/whitechapel_pro/file_contexts | 1 - legacy/zuma/vendor/vendor_init.te | 1 - vendor/device.te | 1 + vendor/vendor_init.te | 2 ++ 5 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 vendor/device.te diff --git a/legacy/whitechapel_pro/device.te b/legacy/whitechapel_pro/device.te index 7d31940..8c24eef 100644 --- a/legacy/whitechapel_pro/device.te +++ b/legacy/whitechapel_pro/device.te @@ -1,4 +1,3 @@ -type sg_device, dev_type; type vendor_toe_device, dev_type; type lwis_device, dev_type; type rls_device, dev_type; diff --git a/legacy/whitechapel_pro/file_contexts b/legacy/whitechapel_pro/file_contexts index 184c997..0e6ab82 100644 --- a/legacy/whitechapel_pro/file_contexts +++ b/legacy/whitechapel_pro/file_contexts @@ -29,7 +29,6 @@ /dev/fimg2d u:object_r:graphics_device:s0 /dev/g2d u:object_r:graphics_device:s0 /dev/dit2 u:object_r:vendor_toe_device:s0 -/dev/sg1 u:object_r:sg_device:s0 /dev/st21nfc u:object_r:nfc_device:s0 /dev/sys/block/bootdevice(/.*)? u:object_r:bootdevice_sysdev:s0 /dev/socket/chre u:object_r:chre_socket:s0 diff --git a/legacy/zuma/vendor/vendor_init.te b/legacy/zuma/vendor/vendor_init.te index 73df26d..91e2786 100644 --- a/legacy/zuma/vendor/vendor_init.te +++ b/legacy/zuma/vendor/vendor_init.te @@ -7,7 +7,6 @@ set_prop(vendor_init, logpersistd_logging_prop) allow vendor_init proc_dirty:file w_file_perms; allow vendor_init proc_sched:file w_file_perms; -allow vendor_init sg_device:chr_file r_file_perms; allow vendor_init bootdevice_sysdev:file create_file_perms; allow vendor_init modem_img_file:filesystem { getattr }; diff --git a/vendor/device.te b/vendor/device.te new file mode 100644 index 0000000..89b586b --- /dev/null +++ b/vendor/device.te @@ -0,0 +1 @@ +type sg_device, dev_type; diff --git a/vendor/vendor_init.te b/vendor/vendor_init.te index c195c40..129fb11 100644 --- a/vendor/vendor_init.te +++ b/vendor/vendor_init.te @@ -1,2 +1,4 @@ # USB property set_prop(vendor_init, vendor_usb_config_prop) + +allow vendor_init sg_device:chr_file r_file_perms;