From 82dd66ca6637cb28671d04e3928f343a952eb64c Mon Sep 17 00:00:00 2001 From: SalmaxChang Date: Fri, 13 Jul 2018 10:17:56 +0800 Subject: [PATCH] wahoo: init: Remove possible unlabeled persist_rfs_file to WA denials Bug: 78019660 - There are some wahoo devices occur unlabeled denials on persist_rfs_file (/persist/rfs/msm/mpss/server_check.txt) with doing restorecon /persist. - server_check.txt will be checked and re-generated whenever tftp_server is up. Remove it and let tftp_server to re-generate it to workaround the denials on these devices avc: denied { getattr } for comm="tftp_server" path="/persist/rfs/msm/mpss/server_check.txt" dev="sdd3" ino=74 scontext=u:r:rfs_access:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0 avc: denied { read } for comm="tftp_server" name="server_check.txt" dev="sdd3" ino=66 scontext=u:r:rfs_access:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0 Change-Id: I105485111a2ca6072d596160fa7390e43e483b01 Signed-off-by: SalmaxChang --- init.hardware.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.hardware.rc b/init.hardware.rc index ad944409..7c3dbe32 100644 --- a/init.hardware.rc +++ b/init.hardware.rc @@ -190,6 +190,9 @@ on fs chmod 0770 /persist/rfs/apq/gnss chmod 0770 /persist/hlos_rfs + # b/78019660 Remove unlabeled persist_rfs_file + rm /persist/rfs/msm/mpss/server_check.txt + # for android.hardware.health@2.0-service.marlin cycle count backup mkdir /persist/battery 0700 system system