Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ade77b4 authored by Tom Cherry's avatar Tom Cherry Committed by android-build-merger
Browse files

Merge "init: clarify comment for the restorecon of second stage init" am: 424ffa2d am: f1e6db55

am: 28f2c822

Change-Id: If9c12d3ed47f06fb9670e685d948d786ab680bb9
parents cc942f05 28f2c822
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -138,9 +138,10 @@ int main(int argc, char** argv) {
    SelinuxSetupKernelLogging();
    SelinuxInitialize();

    // Unneeded?  It's an ext4 file system so shouldn't it have the right domain already?
    // We're in the kernel domain, so re-exec init to transition to the init domain now
    // that the SELinux policy has been loaded.
    // We're in the kernel domain and want to transition to the init domain when we exec second
    // stage init.  File systems that store SELabels in their xattrs, such as ext4 do not need an
    // explicit restorecon here, but other file systems do.  In particular, this is needed for
    // ramdisks such as the recovery image for A/B devices.
    if (selinux_android_restorecon("/system/bin/init", 0) == -1) {
        PLOG(FATAL) << "restorecon failed of /system/bin/init failed";
    }