From c4dcb16ca9f51341fdd81a61fb3c00861344c030 Mon Sep 17 00:00:00 2001 From: mcampbellsmith Date: Sat, 28 Dec 2013 22:08:52 +1100 Subject: [PATCH] Recheck /data for selinux labeling This simply adds checks for selinux labels for files under /data/misc/wifi which were not labeled correctly for some devices Change-Id: Iaacf6db792aaea1485502b424d639a1212c5841b --- prebuilt/common/etc/init.d/50selinuxrelabel | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/prebuilt/common/etc/init.d/50selinuxrelabel b/prebuilt/common/etc/init.d/50selinuxrelabel index 9332f007..d46c23ff 100644 --- a/prebuilt/common/etc/init.d/50selinuxrelabel +++ b/prebuilt/common/etc/init.d/50selinuxrelabel @@ -19,6 +19,13 @@ if [ $? -eq 0 ]; then LABELDATA=1 fi +# Recheck other files under /data +ls -Z /data/misc/wifi/wpa_supplicant.conf | grep -q "wifi_" +if [ $? -eq 1 ]; then + $L "data is unlabeled, fixing..." + LABELDATA=1 +fi + ls -Z /system/bin/surfaceflinger | grep -q unlabeled if [ $? -eq 0 ]; then $L "system is unlabeled, fixing... (You really should update your recovery)"