Possible bug with 2.6.4 client on Windows 2000

Pierre Goyette pierre at montreal.hcl.com
Thu Sep 2 10:39:04 EDT 2004


I believe that there is a bug with the 2.6.4 client on Windows. The
following code has an incorrect check for Windows XP.
 
is_windows_xp (void)
{
   static BOOL fChecked = FALSE;
   static BOOL fIsWinXP = FALSE;
 
   if (!fChecked)
   {
       OSVERSIONINFO Version;
 
       memset (&Version, 0x00, sizeof(Version));
       Version.dwOSVersionInfoSize = sizeof(Version);
 
       if (GetVersionEx (&Version))
       {
           if (Version.dwPlatformId == VER_PLATFORM_WIN32_NT &&
                (Version.dwMajorVersion >= 5 ||
                 Version.dwMajorVersion == 5 && Version.dwMinorVersion
>= 1) )
               fIsWinXP = TRUE;
       }
       fChecked = TRUE;
   }
 
   return fIsWinXP;
}
 

The check should be:
 
                (Version.dwMajorVersion > 5 ||
                 Version.dwMajorVersion == 5 && Version.dwMinorVersion
>= 1) )

Windows 2000 reports a MajorVersion of 5 but MinorVersion of 0.
Unfortunately, this minor error causes Leash32.exe to be unable to
automatically import tickets on Windows 2000 platforms.
 
Regards,
 
Pierre Goyette
Senior Director, Research and Development
Connectivity Products
Hummingbird Ltd.


More information about the krbdev mailing list