Merge "Reland "Set the log callback earlier for showing system property set denials""

This commit is contained in:
Alex Hong 2023-02-02 14:04:35 +00:00 committed by Gerrit Code Review
commit 4c80eb13aa

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();