Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use RtlGetVersion instead of GetVersion (#1846)
GetVersion API returns correct OS version values only if the calling binary is manifested. Hcsshim is manifested. However, other binaries using the osversion package from hcsshim (like containerd) are not manifested and so they are not able to get the accurate OS version information. RtlGetVersion doesn't need the binary to be manifested so this commit replaces the use of GetVersion with RtlGetVersion. Note that hcsshim is still manifested even if we aren't using GetVersion anymore. This is because there are some other advantages of using a manifest as described here: https://learn.microsoft.com/en-us/windows/win32/w8cookbook/application--executable--manifest. The use of a default thread pool for RPC and the fix for a race condition in GetOverlappedResult are relevant to hcsshim. So in order to keep these behaviors same we want to keep hcsshim binary manifested. Signed-off-by: Amit Barve <ambarve@microsoft.com>
- Loading branch information