solve race condition

This commit is contained in:
Jan F. Chadima 2010-02-22 09:23:38 +00:00
parent 00d1e65b55
commit 410f2cd182
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,16 @@
diff -up cyrus-sasl-2.1.23/lib/common.c.race cyrus-sasl-2.1.23/lib/common.c
--- cyrus-sasl-2.1.23/lib/common.c.race 2010-02-22 09:57:28.000000000 +0100
+++ cyrus-sasl-2.1.23/lib/common.c 2010-02-22 09:59:30.000000000 +0100
@@ -794,7 +794,11 @@ void sasl_dispose(sasl_conn_t **pconn)
if (result!=SASL_OK) return;
/* *pconn might have become NULL by now */
- if (! (*pconn)) return;
+ if (! (*pconn))
+ {
+ sasl_MUTEX_UNLOCK(free_mutex);
+ return;
+ }
(*pconn)->destroy_conn(*pconn);
sasl_FREE(*pconn);

View File

@ -9,7 +9,7 @@
Summary: The Cyrus SASL library Summary: The Cyrus SASL library
Name: cyrus-sasl Name: cyrus-sasl
Version: 2.1.23 Version: 2.1.23
Release: 8%{?dist} Release: 9%{?dist}
License: BSD License: BSD
Group: System Environment/Libraries Group: System Environment/Libraries
# Source0 originally comes from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/; # Source0 originally comes from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/;
@ -38,6 +38,7 @@ Patch33: cyrus-sasl-2.1.22-current-db.patch
Patch34: cyrus-sasl-2.1.22-ldap-timeout.patch Patch34: cyrus-sasl-2.1.22-ldap-timeout.patch
Patch35: cyrus-sasl-2.1.22-bad-elif.patch Patch35: cyrus-sasl-2.1.22-bad-elif.patch
Patch36: cyrus-sasl-2.1.23-ac-quote.patch Patch36: cyrus-sasl-2.1.23-ac-quote.patch
Patch37: cyrus-sasl-2.1.23-race.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf, automake, libtool, gdbm-devel, groff BuildRequires: autoconf, automake, libtool, gdbm-devel, groff
@ -157,6 +158,7 @@ chmod -x include/*.h
%patch34 -p1 -b .ldap-timeout %patch34 -p1 -b .ldap-timeout
%patch35 -p1 -b .elif %patch35 -p1 -b .elif
%patch36 -p1 -b .ac-quote %patch36 -p1 -b .ac-quote
%patch37 -p1 -b .race
%build %build
# FIXME - we remove these files directly so that we can avoid using the -f # FIXME - we remove these files directly so that we can avoid using the -f
@ -393,6 +395,9 @@ fi
%{_sbindir}/sasl2-shared-mechlist %{_sbindir}/sasl2-shared-mechlist
%changelog %changelog
* Mon Feb 22 2010 Jan F. Chadima <jchadima@redhat.com> - 2.1.23-9
- solve race condition (#566875)
* Wed Feb 17 2010 Stepan Kasal <skasal@redhat.com> - 2.1.23-8 * Wed Feb 17 2010 Stepan Kasal <skasal@redhat.com> - 2.1.23-8
- improve m4 quoting to fix saslauthd/configure (#566088) - improve m4 quoting to fix saslauthd/configure (#566088)
- call autotools in build, not in prep - call autotools in build, not in prep