[PATCH] for bug 2376501: Krb5LoginModule config class does not return proper KDC list from DNS

Weijun Wang weijun.wang at oracle.com
Tue Nov 6 16:52:48 PST 2012


Hi Severin

The fix looks fine. There is one place it might get enhanced:

         if (value.charAt(j) == ':') {
             kdcs = (value.substring(0, j)).trim();
         }

So this changes a.com:88 to a.com. If the port is really 88, it's OK. 
Otherwise, info gets lost. Maybe we can keep the whole string.

BTW, are you OK with contributing the fix into OpenJDK main repo?

Thanks
Max


On 11/06/2012 11:08 PM, Severin Gehwolf wrote:
> Hi,
>
> In Config.java, line 1234 in method getKDCFromDNS(String realm) there is
> a loop which discards earlier values of KDCs returned rather than
> concatenating them. This results in a behaviour where only one KDC in a
> seemingly random fashion is returned. In fact, the KDC returned depends
> on the order which KrbServiceLocator.getKerberosService(realm, "_udp")
> returns the servers. The correct behaviour should be to return a String
> containing ALL KDCs available via DNS (separated by spaces).
>
> The webrev is here:
> http://jerboaa.fedorapeople.org/bugs/openjdk/2376501/webrev/
>
> Comments and suggestions very welcome!
>
> Thanks,
> Severin
>



More information about the distro-pkg-dev mailing list