summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreehugger Robot2017-05-03 21:07:02 -0500
committerGerrit Code Review2017-05-03 21:07:02 -0500
commite2629c5682bdd680cbca94ac496f34be4a891a8d (patch)
treebc389d3fb5075549e0b07318a621321bfb9b8933
parentc7988b1f684d7c0b86a0e3d58228ebc45297c858 (diff)
parent2d019f859b5b4c29eb59794c731316cefa99994d (diff)
downloadplatform-system-core-e2629c5682bdd680cbca94ac496f34be4a891a8d.tar.gz
platform-system-core-e2629c5682bdd680cbca94ac496f34be4a891a8d.tar.xz
platform-system-core-e2629c5682bdd680cbca94ac496f34be4a891a8d.zip
Merge "init: manually restorecon mke2fs tools on ramdisk"
-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.