From f9eb06e899bd95e62ef494aed2a38973bda031c2 Mon Sep 17 00:00:00 2001 From: roynatech2544 Date: Tue, 14 Dec 2021 14:57:14 +0900 Subject: [PATCH] universal7885: fixup sepolicy denials Signed-off-by: roynatech2544 --- universal7885-common/debug/init.debug_daemon.rc | 3 ++- universal7885-common/sepolicy/vendor/debug_daemon.te | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/universal7885-common/debug/init.debug_daemon.rc b/universal7885-common/debug/init.debug_daemon.rc index ba9f09e..77bbdd7 100644 --- a/universal7885-common/debug/init.debug_daemon.rc +++ b/universal7885-common/debug/init.debug_daemon.rc @@ -9,6 +9,7 @@ on post-fs-data mkdir /data/debug/logs 0755 root system rm /data/debug/logcat.txt rm /data/debug/kmsg.txt + start debug_daemon on property:sys.boot_completed=1 - start debug_daemon + stop debug_daemon diff --git a/universal7885-common/sepolicy/vendor/debug_daemon.te b/universal7885-common/sepolicy/vendor/debug_daemon.te index 9b593e9..9bb3127 100644 --- a/universal7885-common/sepolicy/vendor/debug_daemon.te +++ b/universal7885-common/sepolicy/vendor/debug_daemon.te @@ -7,4 +7,7 @@ allow debug_daemon debug_daemon_data_file:dir rw_dir_perms; allow debug_daemon debug_daemon_data_file:file rw_file_perms; allow debug_daemon proc_kmsg:file r_file_perms; allow debug_daemon logcat_exec:file rx_file_perms; +allow debug_daemon self:capability2 syslog; +allow debug_daemon kernel:system syslog_mod; +allow debug_daemon debug_daemon_data_file:file create_file_perms;