Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6793475

krb5.ini not found on some Windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 7
    • 7
    • security-libs

        We're now looking for the location of krb5.ini on Windows like this:

           len = GetWindowsDirectory(NULL, 0);
           TCHAR* path = new TCHAR(len);
           GetWindowsDirectory(path, len);
           // krb5.ini should be in path now

        However, in some Windows Server 2008 SP1 installations, a strange behavior is observed:

           GetWindowsDirectory(NULL, 0) return 11, looks like length of "C:\Windows" + 1
           GetWindowsDirectory(path, 11) returns 12, and fills path with ""
           GetWindowsDirectory(longpath, 999) returns 20, and fills path with "C:\Users\Me\Windows"

        The reason is unknown yet, but the result is Java looks for krb5.ini in "", and -- unfound.
        This only happens in Windows 2008 (and Vista) when Terminal Services are installed.

              weijun Weijun Wang
              weijun Weijun Wang
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: