[RFR] [8u242] [1/2] 8031111: fix krb5 caddr
Andrew John Hughes
gnu.andrew at redhat.com
Wed Jan 15 18:43:48 UTC 2020
Webrev: https://cr.openjdk.java.net/~andrew/openjdk8/8031111/webrev.01/
Bug: https://bugs.openjdk.java.net/browse/JDK-8031111
Recent changes to 8u242 have led to a latent OpenJDK 8 bug being exposed
by the greater use of the KRB_NT_SRV_HST service type. This failure was
exposed by the 8u backport of 8215032 [0]. In
particular, by this line [1]. The reason is that the service Principal
type changed from KRB_NT_UNKNOWN (default in the PrincipalName
constructor that receives a string argument only) to KRB_NT_SRV_HST.
OpenJDK 8u still has this code:
if (server.getNameType() == PrincipalName.KRB_NT_SRV_HST) {
sAddrs = new HostAddresses(server);
}
which was removed in JDK-8132111 in OpenJDK 9+ [0].
This is the first of two backports to get JDK-8132111 into 8u242. We
will then tag as jdk8u242-b08 & jdk8u242-ga, if there are no further
testing failures.
The main reason to introduce JDK-8031111 as a pre-requisite is that it
also introduces two testcases for this behaviour. Both pass with this
patch. JDK-8132111 will later remove the actual host lookup additions.
It was largely a clean backport. The changes are:
1. Standard addition of -Dsun.net.spi.nameservice.provider.1=ns,mock to
both testcases, a requirement in 8u to be able to look down the rabbit.hole
2. Some contextual differences in KDC.java, due to later changes already
being present in 8u.
[0] https://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/6e79bf791069
[1] https://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/6e79bf791069#l11.105
[2] https://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/77228d1afabb
This has been internally reviewed by Martin Balao, who has worked on
most of the Kerberos fixes & with whom I diagnosed this issue, so it
just needs a formal review from an 8u reviewer to go in.
I'll flag as jdk8u-critical-request once reviewed.
Thanks,
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
https://keybase.io/gnu_andrew
More information about the jdk8u-dev
mailing list