From 0f16f3c92b9477bf6392c4ce03c266c3f345d878444a44653dc39b4cd66ee4b9 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 24 Jan 2013 09:17:03 +0000 Subject: [PATCH] Accepting request 149586 from home:leonardocf:branches:openSUSE:Factory Adds fix for bnc#793336: fix spin-loop bug in k5_sendto_kdc. I'm bypassing the devel project because it currently has krb5-0.11 and we don't want to update to that version this late in the release cycle. So I'm submitting only this fix (cherry-picked from 0.11) hoping that it can be accepted for 12.3. OBS-URL: https://build.opensuse.org/request/show/149586 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/krb5?expand=0&rev=86 --- krb5-1.10-spin-loop.patch | 29 +++++++++++++++++++++++++++++ krb5-doc.spec | 2 +- krb5-mini.changes | 6 ++++++ krb5-mini.spec | 4 +++- krb5.changes | 6 ++++++ krb5.spec | 4 +++- 6 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 krb5-1.10-spin-loop.patch diff --git a/krb5-1.10-spin-loop.patch b/krb5-1.10-spin-loop.patch new file mode 100644 index 0000000..4a3b24c --- /dev/null +++ b/krb5-1.10-spin-loop.patch @@ -0,0 +1,29 @@ +commit 2b06a22f7fd8ec01fb27a7335125290b8ceb6f18 +Author: Greg Hudson +Date: Thu Nov 29 01:58:13 2012 -0500 + + Fix spin-loop bug in k5_sendto_kdc + + In the second part of the first pass over the server list, we passed + the wrong list pointer to service_fds, causing it to see only a subset + of the server entries corresponding to sel_state. This could cause + service_fds to spin if an event is reported on an fd not in the + subset. + + ticket: 7454 + target_version: 1.10.4 + tags: pullup + +Index: krb5-1.10.2/src/lib/krb5/os/sendto_kdc.c +=================================================================== +--- krb5-1.10.2.orig/src/lib/krb5/os/sendto_kdc.c ++++ krb5-1.10.2/src/lib/krb5/os/sendto_kdc.c +@@ -1287,7 +1287,7 @@ k5_sendto(krb5_context context, const kr + continue; + if (maybe_send(context, state, sel_state, callback_info)) + continue; +- done = service_fds(context, sel_state, 1, state, seltemp, msg_handler, ++ done = service_fds(context, sel_state, 1, conns, seltemp, msg_handler, + msg_handler_data, &winner); + } + diff --git a/krb5-doc.spec b/krb5-doc.spec index 33f5260..958748b 100644 --- a/krb5-doc.spec +++ b/krb5-doc.spec @@ -1,7 +1,7 @@ # # spec file for package krb5-doc # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/krb5-mini.changes b/krb5-mini.changes index 7d147d2..6c1e5bb 100644 --- a/krb5-mini.changes +++ b/krb5-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 22 13:55:52 UTC 2013 - lchiquitto@suse.com + +- krb5-1.10-spin-loop.patch: fix spin-loop bug in k5_sendto_kdc + (bnc#793336) + ------------------------------------------------------------------- Tue Oct 16 12:05:00 UTC 2012 - coolo@suse.com diff --git a/krb5-mini.spec b/krb5-mini.spec index 55d27a7..f8ed2a2 100644 --- a/krb5-mini.spec +++ b/krb5-mini.spec @@ -1,7 +1,7 @@ # # spec file for package krb5-mini # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -65,6 +65,7 @@ Patch18: krb5-1.9-kprop-mktemp.patch Patch19: krb5-1.9-ksu-path.patch Patch20: krb5-1.10-gcc47.patch Patch21: krb5-1.10-selinux-label.patch +Patch22: krb5-1.10-spin-loop.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: mktemp, grep, /bin/touch, coreutils PreReq: %insserv_prereq %fillup_prereq @@ -159,6 +160,7 @@ Include Files for Development %patch18 -p1 %patch19 -p1 %patch20 +%patch22 -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 c9a1734..6cd8800 100644 --- a/krb5.changes +++ b/krb5.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 22 13:55:52 UTC 2013 - lchiquitto@suse.com + +- krb5-1.10-spin-loop.patch: fix spin-loop bug in k5_sendto_kdc + (bnc#793336) + ------------------------------------------------------------------- Tue Oct 16 19:35:47 UTC 2012 - coolo@suse.com diff --git a/krb5.spec b/krb5.spec index c74625d..2c13313 100644 --- a/krb5.spec +++ b/krb5.spec @@ -1,7 +1,7 @@ # # spec file for package krb5 # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -65,6 +65,7 @@ Patch18: krb5-1.9-kprop-mktemp.patch Patch19: krb5-1.9-ksu-path.patch Patch20: krb5-1.10-gcc47.patch Patch21: krb5-1.10-selinux-label.patch +Patch22: krb5-1.10-spin-loop.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: mktemp, grep, /bin/touch, coreutils PreReq: %insserv_prereq %fillup_prereq @@ -159,6 +160,7 @@ Include Files for Development %patch18 -p1 %patch19 -p1 %patch20 +%patch22 -p1 # Rename the man pages so that they'll get generated correctly. pushd src cat %{SOURCE10} | while read manpage ; do