From a68d8c9ea3087846685d71b248860652aed96741 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Thu, 10 Jan 2019 10:57:00 -0800 Subject: [PATCH] init: Remove the obsolete restorecon for /sbin files. These files, including their building rules, have been removed in favor of their dynamically linked versions; we no longer need to explicitly restorecon the actual files either, for the same reason as in commit 05f96a2561ff6916ecdc1ac431785ac9f7beff63. When doing normal boot, these files come from system.img, which have been labeled at build time; when booting recovery, they don't need dedicated labels to be functional. Test: Build and boot crosshatch. Test: Factory reset under recovery on taimen (mke2fs). Test: Factory reset under recovery on crosshatch (make_f2fs). Change-Id: Icbcd24aad8be1e7f4ba7d379acd5855d256ae106 --- init/selinux.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/init/selinux.cpp b/init/selinux.cpp index e4da52c31..c0fc3ce49 100644 --- a/init/selinux.cpp +++ b/init/selinux.cpp @@ -434,12 +434,6 @@ void SelinuxRestoreContext() { selinux_android_restorecon("/dev/block", SELINUX_ANDROID_RESTORECON_RECURSE); selinux_android_restorecon("/dev/device-mapper", 0); - - selinux_android_restorecon("/sbin/mke2fs_static", 0); - selinux_android_restorecon("/sbin/e2fsdroid_static", 0); - - selinux_android_restorecon("/sbin/mkfs.f2fs", 0); - selinux_android_restorecon("/sbin/sload.f2fs", 0); } int SelinuxKlogCallback(int type, const char* fmt, ...) {