Revert "Add SELinux filesystem relabeling to init"

This reverts commit d2d1a7ffb1f5e831ed654379496f0efe88159a66.

Revert "selinuxrelabel: Remove attempts to relabel /system"

This reverts commit cae5f245304fe11e86323aa7f6f4c25e898bf36b.

Revert "Recheck /data for selinux labeling"

This reverts commit c4dcb16ca9f51341fdd81a61fb3c00861344c030.

Revert "selinuxrelabel: Add a check for dalvik-cache"

This reverts commit c7e92306143a7b11b570ea110bc467d881a2528d.

Revert "selinuxrelabel: Need to check in priv-app now"

This reverts commit 3013c99acb51f8c2aa1156930e864cfdbcc22135.

Revert "selinux: When adding userdata labels, do cache too"

This reverts commit 8994907baf46dc1ddd78467ec57ff78639c01937.

Revert "selinux: Use a more reliable sentinel to flag /data labelling"

This reverts commit b52874de531340af02ac8e664d828dcd02d2d860.

Change-Id: I7779aaca3b0751ed74d525292681817182a0aa7f
diff --git a/config/common.mk b/config/common.mk
index 1653d4b..b83b994 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -96,10 +96,6 @@
 PRODUCT_COPY_FILES += \
     vendor/cm/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit
 
-# SELinux filesystem labels
-PRODUCT_COPY_FILES += \
-    vendor/cm/prebuilt/common/etc/init.d/50selinuxrelabel:system/etc/init.d/50selinuxrelabel
-
 # CM-specific init file
 PRODUCT_COPY_FILES += \
     vendor/cm/prebuilt/common/etc/init.local.rc:root/init.cm.rc
diff --git a/prebuilt/common/etc/init.d/50selinuxrelabel b/prebuilt/common/etc/init.d/50selinuxrelabel
deleted file mode 100644
index dfa576d..0000000
--- a/prebuilt/common/etc/init.d/50selinuxrelabel
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/system/bin/sh
-
-L="log -p i -t SELinuxLabel"
-
-# Bail out early if not on a SELinux build
-getprop ro.build.selinux | grep -q 1 || exit
-if [ ! -f /file_contexts ]; then
-  exit
-fi
-
-LABELDATA=0
-LABELDALVIKCACHE=0
-
-# Test /data
-ls -Zd /data/system | grep -q unlabeled
-if [ $? -eq 0 ]; then
-  $L "userdata is unlabeled, fixing..."
-  LABELDATA=1
-fi
-
-# Double-check other files under /data
-ls -Z /data/misc/wifi/wpa_supplicant.conf | grep -q "wifi_"
-if [ $? -eq 1 ]; then
-  $L "data is mis-labeled, fixing..."
-  LABELDATA=1
-fi
-
-ls -Zd /data/dalvik-cache | grep -q unlabeled
-if [ $? -eq 0 ]; then
-  $L "dalvik-cache is unlabeled, fixing..."
-  LABELDALVIKCACHE=1
-fi
-
-ls -Zd /cache/dalvik-cache | grep -q unlabeled
-if [ $? -eq 0 ]; then
-  $L "dalvik-cache is unlabeled, fixing..."
-  LABELDALVIKCACHE=1
-fi
-
-
-if [ $LABELDATA = "1" ]; then
-  $L "/data relabel starting..."
-  restorecon -R /data
-  $L "/data relabel complete"
-  $L "/cache relabel starting..."
-  restorecon -R /cache
-  $L "/cache relabel complete"
-fi
-
-if [ $LABELDALVIKCACHE = "1" ]; then
-  $L "dalvik-cache relabel starting..."
-  restorecon -R /data/dalvik-cache
-  restorecon -R /cache/dalvik-cache
-  $L "dalvik-cache relabel complete"
-fi