From 1ee114f4d7df18897d6c7de8b2088fe9e4085544 Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Thu, 5 Oct 2023 02:46:42 +0000 Subject: [PATCH] gps: add sepolicy to coredump node Bug: 303343788 Test: b/303343788 verified the SIGABRT/SIGSEGV signal Change-Id: I5587f632d4cbd2d9210e37c08a19981fb9967a80 --- vendor/file.te | 3 ++- vendor/genfs_contexts | 2 ++ vendor/gnssd.te | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/vendor/file.te b/vendor/file.te index 27f6f85..4fded5a 100644 --- a/vendor/file.te +++ b/vendor/file.te @@ -1 +1,2 @@ -type sysfs_modem_state, sysfs_type, fs_type; \ No newline at end of file +type sysfs_modem_state, sysfs_type, fs_type; +type sysfs_gps, sysfs_type, fs_type; diff --git a/vendor/genfs_contexts b/vendor/genfs_contexts index 3e956d6..f7c8a2e 100644 --- a/vendor/genfs_contexts +++ b/vendor/genfs_contexts @@ -61,6 +61,8 @@ genfscon sysfs /devices/platform/10cb0000.hsi2c/i2c-7/7-0025/power_supply/tcpm-s genfscon sysfs /devices/platform/10cb0000.hsi2c/i2c-9/9-0025/power_supply/tcpm-source-psy-9-0025/wakeup u:object_r:sysfs_wakeup:s0 genfscon sysfs /devices/platform/gnssif/wakeup u:object_r:sysfs_wakeup:s0 +# gps coredump node +genfscon sysfs /devices/platform/gnssif/coredump u:object_r:sysfs_gps:s0 # modem state genfscon sysfs /devices/platform/cpif/modem_state u:object_r:sysfs_modem_state:s0 diff --git a/vendor/gnssd.te b/vendor/gnssd.te index 487bcbb..8450253 100644 --- a/vendor/gnssd.te +++ b/vendor/gnssd.te @@ -24,3 +24,4 @@ net_domain(gnssd); get_prop(gnssd, bootanim_system_prop) allow gnssd sysfs_soc:file r_file_perms; +allow gnssd sysfs_gps:file rw_file_perms;