8274205: Handle KDC_ERR_SVC_UNAVAILABLE error code from KDC

Co-authored-by: Weijun Wang <weijun@openjdk.org>
Reviewed-by: weijun
This commit is contained in:
Alexey Bakhtin 2021-09-24 12:09:38 +00:00 committed by Vladimir Kempik
parent 5a12af762d
commit 5ba0d09fe4
3 changed files with 88 additions and 2 deletions

View file

@ -256,9 +256,14 @@ public final class KdcComm {
} catch (Exception e) {
// OK
}
if (ke != null && ke.getErrorCode() ==
if (ke != null) {
if (ke.getErrorCode() ==
Krb5.KRB_ERR_RESPONSE_TOO_BIG) {
ibuf = send(obuf, tempKdc, true);
ibuf = send(obuf, tempKdc, true);
} else if (ke.getErrorCode() ==
Krb5.KDC_ERR_SVC_UNAVAILABLE) {
throw new KrbException("A service is not available");
}
}
KdcAccessibility.removeBad(tempKdc);
return ibuf;