Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-1415

Replace Facter 3.x Windows Operating System kernel query with Windows Kernel API call RtlGetVersion

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • FACT 3.1.6
    • FACT 3.11.5
    • Windows
    • Platform OS
    • Platform OS Kanban
    • Not Needed

    Description

      Currently the version for kernel32.dll is discovered by using GetFileVersionInfoW in the kernel resolver, and that's passed out as the OS version - https://github.com/puppetlabs/facter/blob/master/lib/src/facts/windows/kernel_resolver.cc#L16-L60

      However, it's uncertain if that's the best path forward. Historically we could use the GetVersionEx API - however, as of Windows 8.1, there are some interesting notes about how that API has changed:

      Applications not manifested for Windows 8.1 or Windows 10 will return the Windows 8 OS version value (6.2). Once an application is manifested for a given operating system version, GetVersionEx will always return the version that the application is manifested for in future releases. To manifest your applications for Windows 8.1 or Windows 10, refer to Targeting your application for Windows.

      - this points to docs at https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241(v=vs.85).aspx

      It's uncertain if the current kernel32.dll approach will experience the same issue as GetVersionEx, but the code in Facter 2.x has been changed to use RtlGetVersion instead per FACT-1395

      Attachments

        Issue Links

          Activity

            People

              enis.inan Enis Inan
              ethan Ethan Brown
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support