summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--init/init.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/init/init.cpp b/init/init.cpp
index 8758653a4..52f6b0cec 100644
--- a/init/init.cpp
+++ b/init/init.cpp
@@ -864,9 +864,9 @@ static void selinux_initialize(bool in_kernel_domain) {
864 } 864 }
865} 865}
866 866
867// The files and directories that were created before initial sepolicy load 867// The files and directories that were created before initial sepolicy load or
868// need to have their security context restored to the proper value. 868// files on ramdisk need to have their security context restored to the proper
869// This must happen before /dev is populated by ueventd. 869// value. This must happen before /dev is populated by ueventd.
870static void selinux_restore_context() { 870static void selinux_restore_context() {
871 LOG(INFO) << "Running restorecon..."; 871 LOG(INFO) << "Running restorecon...";
872 restorecon("/dev"); 872 restorecon("/dev");
@@ -883,6 +883,9 @@ static void selinux_restore_context() {
883 restorecon("/sys", SELINUX_ANDROID_RESTORECON_RECURSE); 883 restorecon("/sys", SELINUX_ANDROID_RESTORECON_RECURSE);
884 restorecon("/dev/block", SELINUX_ANDROID_RESTORECON_RECURSE); 884 restorecon("/dev/block", SELINUX_ANDROID_RESTORECON_RECURSE);
885 restorecon("/dev/device-mapper"); 885 restorecon("/dev/device-mapper");
886
887 restorecon("/sbin/mke2fs");
888 restorecon("/sbin/e2fsdroid");
886} 889}
887 890
888// Set the UDC controller for the ConfigFS USB Gadgets. 891// Set the UDC controller for the ConfigFS USB Gadgets.