diff --git a/krb5-1.9.1-sendto_poll2.patch b/krb5-1.9.1-sendto_poll2.patch new file mode 100644 index 0000000..5a323d7 --- /dev/null +++ b/krb5-1.9.1-sendto_poll2.patch @@ -0,0 +1,22 @@ +RT#6951 +Index: krb5-1.9.1/src/lib/krb5/os/sendto_kdc.c +=================================================================== +--- krb5-1.9.1.orig/src/lib/krb5/os/sendto_kdc.c ++++ krb5-1.9.1/src/lib/krb5/os/sendto_kdc.c +@@ -895,12 +895,12 @@ maybe_send(krb5_context context, struct + static void + kill_conn(struct conn_state *conn, struct select_state *selstate, int err) + { ++ dprint("abandoning connection %d: %m\n", conn->fd, err); ++ cm_remove_fd(selstate, conn->fd); ++ closesocket(conn->fd); ++ conn->fd = INVALID_SOCKET; + conn->state = FAILED; + conn->err = err; +- shutdown(conn->fd, SHUTDOWN_BOTH); +- cm_remove_fd(selstate, conn->fd); +- dprint("abandoning connection %d: %m\n", conn->fd, err); +- /* Fix up max fd for next select call. */ + } + + /* Check socket for error. */ diff --git a/krb5-1.9.1-sendto_poll3.patch b/krb5-1.9.1-sendto_poll3.patch new file mode 100644 index 0000000..60f966d --- /dev/null +++ b/krb5-1.9.1-sendto_poll3.patch @@ -0,0 +1,18 @@ +If we exit the transmit loop cleanly, don't overestimate the size of the +connections array. This bug appears to have been removed upstream when +this function was rewritten in trunk, and the select()-based implementation +is still what's in 1.9, so this patch has nowhere to go. +--- krb5-1.9.1/src/lib/krb5/os/sendto_kdc.c 2011-09-28 14:54:20.560811664 -0400 ++++ krb5-1.9.1/src/lib/krb5/os/sendto_kdc.c 2011-09-28 14:54:11.396812292 -0400 +@@ -1317,7 +1319,10 @@ krb5int_sendto (krb5_context context, co + call with the last one from the above loop, if the loop + actually calls select. */ + sel_state->end_time.tv_sec += delay_this_pass; +- e = service_fds(context, sel_state, conns, host+1, &winning_conn, ++ i = host+1; ++ if (i > n_conns) ++ i = n_conns; ++ e = service_fds(context, sel_state, conns, i, &winning_conn, + sel_state+1, msg_handler, msg_handler_data); + if (e) + break; diff --git a/krb5-mini.changes b/krb5-mini.changes index 530f8a5..1735131 100644 --- a/krb5-mini.changes +++ b/krb5-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Nov 21 11:11:54 CET 2011 - mc@suse.de + +- fix KDC HA feature introduced with implementing KDC poll + (RT#6951) + ------------------------------------------------------------------- Fri Nov 18 08:35:52 UTC 2011 - rhafer@suse.de diff --git a/krb5-mini.spec b/krb5-mini.spec index 1630ab5..3a09d9a 100644 --- a/krb5-mini.spec +++ b/krb5-mini.spec @@ -73,6 +73,8 @@ Patch25: krb5-trunk-gss_delete_sec.patch Patch26: krb5-trunk-kadmin-oldproto.patch Patch30: krb5-1.9-MITKRB5-SA-2011-006.dif Patch31: krb5-1.9-gss_display_status-iakerb.patch +Patch32: krb5-1.9.1-sendto_poll2.patch +Patch33: krb5-1.9.1-sendto_poll3.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: mktemp, grep, /bin/touch, coreutils PreReq: %insserv_prereq %fillup_prereq @@ -236,6 +238,8 @@ Authors: %patch26 %patch30 -p1 %patch31 -p1 +%patch32 -p1 +%patch33 -p1 # Rename the man pages so that they'll get generated correctly. pushd src cat %{SOURCE10} | while read manpage ; do diff --git a/krb5.changes b/krb5.changes index 530f8a5..1735131 100644 --- a/krb5.changes +++ b/krb5.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Nov 21 11:11:54 CET 2011 - mc@suse.de + +- fix KDC HA feature introduced with implementing KDC poll + (RT#6951) + ------------------------------------------------------------------- Fri Nov 18 08:35:52 UTC 2011 - rhafer@suse.de diff --git a/krb5.spec b/krb5.spec index 0b2146b..9dbd734 100644 --- a/krb5.spec +++ b/krb5.spec @@ -73,6 +73,8 @@ Patch25: krb5-trunk-gss_delete_sec.patch Patch26: krb5-trunk-kadmin-oldproto.patch Patch30: krb5-1.9-MITKRB5-SA-2011-006.dif Patch31: krb5-1.9-gss_display_status-iakerb.patch +Patch32: krb5-1.9.1-sendto_poll2.patch +Patch33: krb5-1.9.1-sendto_poll3.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: mktemp, grep, /bin/touch, coreutils PreReq: %insserv_prereq %fillup_prereq @@ -236,6 +238,8 @@ Authors: %patch26 %patch30 -p1 %patch31 -p1 +%patch32 -p1 +%patch33 -p1 # Rename the man pages so that they'll get generated correctly. pushd src cat %{SOURCE10} | while read manpage ; do