rpms/cups/F-11 cups-gnutls-gcrypt-threads.patch, NONE, 1.1 cups.spec, 1.558, 1.559
Tim Waugh
twaugh at fedoraproject.org
Mon Dec 21 17:06:51 UTC 2009
Author: twaugh
Update of /cvs/pkgs/rpms/cups/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29080
Modified Files:
cups.spec
Added Files:
cups-gnutls-gcrypt-threads.patch
Log Message:
* Mon Dec 21 2009 Tim Waugh <twaugh at redhat.com> - 1:1.4.2-18
- Ensure proper thread-safety in gnutls's use of libgcrypt
(bug #544619).
cups-gnutls-gcrypt-threads.patch:
cups/http-private.h | 2 ++
cups/http.c | 4 ++++
scheduler/server.c | 6 ++++--
3 files changed, 10 insertions(+), 2 deletions(-)
--- NEW FILE cups-gnutls-gcrypt-threads.patch ---
diff -up cups-1.4.2/cups/http.c.gnutls-gcrypt-threads cups-1.4.2/cups/http.c
--- cups-1.4.2/cups/http.c.gnutls-gcrypt-threads 2009-12-21 16:50:58.931552118 +0000
+++ cups-1.4.2/cups/http.c 2009-12-21 16:51:15.047552357 +0000
@@ -1161,6 +1161,9 @@ httpHead(http_t *http, /* I - Conne
return (http_send(http, HTTP_HEAD, uri));
}
+#ifdef HAVE_GNUTLS
+GCRY_THREAD_OPTION_PTHREAD_IMPL;
+#endif
/*
* 'httpInitialize()' - Initialize the HTTP interface library and set the
@@ -1205,6 +1208,7 @@ httpInitialize(void)
#endif /* WIN32 */
#ifdef HAVE_GNUTLS
+ gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
gnutls_global_init();
#endif /* HAVE_GNUTLS */
diff -up cups-1.4.2/cups/http-private.h.gnutls-gcrypt-threads cups-1.4.2/cups/http-private.h
--- cups-1.4.2/cups/http-private.h.gnutls-gcrypt-threads 2009-04-07 16:48:14.000000000 +0100
+++ cups-1.4.2/cups/http-private.h 2009-12-21 16:51:15.049552624 +0000
@@ -98,6 +98,8 @@ extern BIO_METHOD *_httpBIOMethods(void)
* The GNU TLS library is more of a "bare metal" SSL/TLS library...
*/
# include <gnutls/gnutls.h>
+# include <gcrypt.h>
+# include <pthread.h>
typedef struct
{
diff -up cups-1.4.2/scheduler/server.c.gnutls-gcrypt-threads cups-1.4.2/scheduler/server.c
--- cups-1.4.2/scheduler/server.c.gnutls-gcrypt-threads 2008-09-10 23:05:29.000000000 +0100
+++ cups-1.4.2/scheduler/server.c 2009-12-21 16:51:15.048553044 +0000
@@ -35,7 +35,9 @@
*/
static int started = 0;
-
+#if !defined(HAVE_LIBSSL) && defined(HAVE_GNUTLS)
+GCRY_THREAD_OPTION_PTHREAD_IMPL;
+#endif
/*
* 'cupsdStartServer()' - Start the server.
@@ -75,7 +77,7 @@ cupsdStartServer(void)
/*
* Initialize the encryption libraries...
*/
-
+ gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
gnutls_global_init();
#endif /* HAVE_LIBSSL */
Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-11/cups.spec,v
retrieving revision 1.558
retrieving revision 1.559
diff -u -p -r1.558 -r1.559
--- cups.spec 19 Dec 2009 13:03:20 -0000 1.558
+++ cups.spec 21 Dec 2009 17:06:51 -0000 1.559
@@ -9,7 +9,7 @@
Summary: Common Unix Printing System
Name: cups
Version: 1.4.2
-Release: 17%{?dist}
+Release: 18%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
@@ -75,6 +75,7 @@ Patch60: cups-str3425.patch
Patch61: cups-str3428.patch
Patch62: cups-str3431.patch
Patch63: cups-delete-active-printer.patch
+Patch64: cups-gnutls-gcrypt-threads.patch
Patch100: cups-lspp.patch
Epoch: 1
@@ -254,6 +255,7 @@ module.
%patch61 -p1 -b .str3428
%patch62 -p1 -b .str3431
%patch63 -p1 -b .delete-active-printer
+%patch64 -p1 -b .gnutls-gcrypt-threads
%if %lspp
%patch100 -p1 -b .lspp
@@ -545,6 +547,10 @@ rm -rf $RPM_BUILD_ROOT
%{php_extdir}/phpcups.so
%changelog
+* Mon Dec 21 2009 Tim Waugh <twaugh at redhat.com> - 1:1.4.2-18
+- Ensure proper thread-safety in gnutls's use of libgcrypt
+ (bug #544619).
+
* Sat Dec 19 2009 Tim Waugh <twaugh at redhat.com> - 1:1.4.2-17
- Fixed patch for STR #3425 by adding in back-ported change from svn
revision 8936 (bug #548904).
More information about the fedora-extras-commits
mailing list