rpms/cups/F-12 cups-gnutls-gcrypt-threads.patch, NONE, 1.1 cups.spec, 1.565, 1.566

Tim Waugh twaugh at fedoraproject.org
Mon Dec 21 17:07:05 UTC 2009


Author: twaugh

Update of /cvs/pkgs/rpms/cups/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29172

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-12/cups.spec,v
retrieving revision 1.565
retrieving revision 1.566
diff -u -p -r1.565 -r1.566
--- cups.spec	19 Dec 2009 13:03:30 -0000	1.565
+++ cups.spec	21 Dec 2009 17:07:05 -0000	1.566
@@ -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
@@ -74,6 +74,7 @@ Patch46: cups-str3425.patch
 Patch47: cups-str3428.patch
 Patch48: cups-str3431.patch
 Patch49: cups-delete-active-printer.patch
+Patch50: cups-gnutls-gcrypt-threads.patch
 
 Patch100: cups-lspp.patch
 
@@ -253,6 +254,7 @@ module. 
 %patch47 -p1 -b .str3428
 %patch48 -p1 -b .str3431
 %patch49 -p1 -b .delete-active-printer
+%patch50 -p1 -b .gnutls-gcrypt-threads
 
 %if %lspp
 %patch100 -p1 -b .lspp
@@ -551,6 +553,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