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

The system32 fact can be confused by an empty directory

    XMLWordPrintable

Details

    • Platform OS
    • Platform OS Kanban
    • Customer Feedback
    • 34897
    • 1
    • Bug Fix
    • Facter now correctly returns the path to system32 on 64-bit systems when a user has manually created the "sysnative" folder.
    • Needs Assessment

    Description

      Facter has a system32 fact that returns the path to the Windows system directory and accounts for whether a 32-bit process is running on a 64-bit system. The implementation of this fact checks for the existence of the "virtual" C:/Windows/sysnative directory and can be fooled if a user creates that as a real directory.

      Reproduction case

      • Install Puppet 5.5.8 64-bit on a 64-bit Windows node.
      • Run facter system32 and observe the output.
      • Create the C:/Windows/sysnative directory.
      • Run facter system32 again.

      Outcome

      Once the sysnative directory is created, facter returns it as the Windows system directory:

      PS C:\Users\Administrator> facter system32
      C:\Windows\system32
      PS C:\Users\Administrator> New-Item -Path C:/Windows/sysnative -ItemType directory
       
       
          Directory: C:\Windows
       
       
      Mode                LastWriteTime         Length Name
      ----                -------------         ------ ----
      d-----       12/21/2018  11:44 PM                sysnative
       
       
      PS C:\Users\Administrator> facter system32
      C:\Windows\sysnative
      

      Expected outcome

      Facter only returns C:/Windows/sysnative for system32 if it is running as a 32-bit process on a 64-bit system.

      Attachments

        Issue Links

          Activity

            People

              branan Branan Riley
              chuck Charlie Sharpsteen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support