Update the initramfs to set 755 permissions on /init (#13567)

This commit is contained in:
Blue 2025-10-06 17:19:49 -07:00 committed by GitHub
parent 9b5659d4b9
commit 9f77522f64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View File

@ -6267,5 +6267,14 @@ Error code: Wsl/InstallDistro/WSL_E_INVALID_JSON\r\n",
std::wstring::npos);
}
TEST_METHOD(InitPermissions)
{
WSL2_TEST_ONLY();
auto [out, _] = LxsstuLaunchWslAndCaptureOutput(L"stat -c %a /init");
VERIFY_ARE_EQUAL(out, L"755\n");
}
}; // namespace UnitTests
} // namespace UnitTests

View File

@ -40,7 +40,7 @@ use constant TRAILER => "TRAILER!!!";
# like initramfs.
#
use constant INODE => 0;
use constant MODE => oct("100777");
use constant MODE => oct("100755");
use constant UID => 0;
use constant GID => 0;
use constant NLINK => 0;