2008-05-17 02:39:26 +02:00
|
|
|
Fall back to TCP on kdc-unresolvable/unreachable errors. We still have
|
|
|
|
to wait for UDP to fail, so this might not be ideal. RT #5868.
|
|
|
|
|
2012-06-06 16:55:51 +02:00
|
|
|
Index: krb5-1.10.2/src/lib/krb5/os/changepw.c
|
2008-05-17 02:39:26 +02:00
|
|
|
===================================================================
|
2012-06-06 16:55:51 +02:00
|
|
|
--- krb5-1.10.2.orig/src/lib/krb5/os/changepw.c
|
|
|
|
+++ krb5-1.10.2/src/lib/krb5/os/changepw.c
|
|
|
|
@@ -274,10 +274,22 @@ change_set_password(krb5_context context
|
|
|
|
&callback_info, &chpw_rep, ss2sa(&remote_addr),
|
|
|
|
&addrlen, NULL, NULL, NULL);
|
|
|
|
if (code) {
|
2010-03-23 12:40:55 +01:00
|
|
|
- /*
|
|
|
|
- * Here we may want to switch to TCP on some errors.
|
|
|
|
- * right?
|
|
|
|
- */
|
|
|
|
+ /* if we're not using a stream socket, and it's an error which
|
|
|
|
+ * might reasonably be specific to a datagram "connection", try
|
|
|
|
+ * again with a stream socket */
|
2012-06-06 16:55:51 +02:00
|
|
|
+ if (!use_tcp) {
|
2010-03-23 12:40:55 +01:00
|
|
|
+ switch (code) {
|
|
|
|
+ case KRB5_KDC_UNREACH:
|
|
|
|
+ case KRB5_REALM_CANT_RESOLVE:
|
|
|
|
+ case KRB5KRB_ERR_RESPONSE_TOO_BIG:
|
|
|
|
+ /* should we do this for more result codes than these? */
|
2012-06-06 16:55:51 +02:00
|
|
|
+ k5_free_serverlist (&sl);
|
|
|
|
+ use_tcp = 1;
|
2010-03-23 12:40:55 +01:00
|
|
|
+ continue;
|
|
|
|
+ default:
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
break;
|
|
|
|
}
|
2008-05-17 02:39:26 +02:00
|
|
|
|