Merge "Reland "Set the log callback earlier for showing system property set denials"" am: 4c80eb13aa

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2361281

Change-Id: Ibc372749621eea51e24fe7f83e256c8d013f4eca
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Alex Hong 2023-02-02 14:23:10 +00:00 committed by Automerger Merge Worker
commit 644b8c7eae

View file

@ -952,6 +952,8 @@ int SecondStageMain(int argc, char** argv) {
InitKernelLogging(argv);
LOG(INFO) << "init second stage started!";
SelinuxSetupKernelLogging();
// Update $PATH in the case the second stage init is newer than first stage init, where it is
// first set.
if (setenv("PATH", _PATH_DEFPATH, 1) != 0) {
@ -1012,7 +1014,6 @@ int SecondStageMain(int argc, char** argv) {
MountExtraFilesystems();
// Now set up SELinux for second stage.
SelinuxSetupKernelLogging();
SelabelInitialize();
SelinuxRestoreContext();