- update the thread safety patch, thanks to Rob Crittenden (#462217)
This commit is contained in:
parent
49abd43b13
commit
3958b78446
@ -1,6 +1,6 @@
|
|||||||
diff -urN curl-7.18.2.orig/lib/nss.c curl-7.18.2/lib/nss.c
|
diff -u --recursive curl-7.18.2/lib/nss.c curl-7.18.2.new/lib/nss.c
|
||||||
--- curl-7.18.2.orig/lib/nss.c 2008-09-03 20:56:33.000000000 -0400
|
--- curl-7.18.2/lib/nss.c 2008-09-16 11:13:00.000000000 -0400
|
||||||
+++ curl-7.18.2/lib/nss.c 2008-09-03 20:57:07.000000000 -0400
|
+++ curl-7.18.2.new/lib/nss.c 2008-09-16 11:29:13.000000000 -0400
|
||||||
@@ -73,6 +73,8 @@
|
@@ -73,6 +73,8 @@
|
||||||
|
|
||||||
PRFileDesc *PR_ImportTCPSocket(PRInt32 osfd);
|
PRFileDesc *PR_ImportTCPSocket(PRInt32 osfd);
|
||||||
@ -10,13 +10,11 @@ diff -urN curl-7.18.2.orig/lib/nss.c curl-7.18.2/lib/nss.c
|
|||||||
int initialized = 0;
|
int initialized = 0;
|
||||||
|
|
||||||
#define HANDSHAKE_TIMEOUT 30
|
#define HANDSHAKE_TIMEOUT 30
|
||||||
@@ -718,9 +720,12 @@
|
@@ -719,8 +721,11 @@
|
||||||
* @retval 1 SSL initialized successfully
|
|
||||||
*/
|
*/
|
||||||
int Curl_nss_init(void)
|
int Curl_nss_init(void)
|
||||||
-{
|
{
|
||||||
- if(!initialized)
|
- if(!initialized)
|
||||||
+{
|
|
||||||
+ /* curl_global_init() is not thread-safe so this test is ok */
|
+ /* curl_global_init() is not thread-safe so this test is ok */
|
||||||
+ if (nss_initlock == NULL) {
|
+ if (nss_initlock == NULL) {
|
||||||
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 256);
|
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 256);
|
||||||
@ -54,7 +52,7 @@ diff -urN curl-7.18.2.orig/lib/nss.c curl-7.18.2/lib/nss.c
|
|||||||
initialized = 1;
|
initialized = 1;
|
||||||
|
|
||||||
certDir = getenv("SSL_DIR"); /* Look in $SSL_DIR */
|
certDir = getenv("SSL_DIR"); /* Look in $SSL_DIR */
|
||||||
@@ -832,8 +848,11 @@
|
@@ -832,6 +848,8 @@
|
||||||
if(rv != SECSuccess) {
|
if(rv != SECSuccess) {
|
||||||
infof(conn->data, "Unable to initialize NSS database\n");
|
infof(conn->data, "Unable to initialize NSS database\n");
|
||||||
curlerr = CURLE_SSL_CACERT_BADFILE;
|
curlerr = CURLE_SSL_CACERT_BADFILE;
|
||||||
@ -62,7 +60,13 @@ diff -urN curl-7.18.2.orig/lib/nss.c curl-7.18.2/lib/nss.c
|
|||||||
+ initialized = 0;
|
+ initialized = 0;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -854,6 +872,7 @@
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
+ PR_Unlock(nss_initlock);
|
+ PR_Unlock(nss_initlock);
|
||||||
|
|
||||||
NSS_SetDomesticPolicy();
|
model = PR_NewTCPSocket();
|
||||||
|
if(!model)
|
||||||
|
Only in curl-7.18.2.new/lib: nss.c.orig
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
|
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
|
||||||
Name: curl
|
Name: curl
|
||||||
Version: 7.18.2
|
Version: 7.18.2
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Applications/Internet
|
Group: Applications/Internet
|
||||||
Source: http://curl.haxx.se/download/%{name}-%{version}.tar.bz2
|
Source: http://curl.haxx.se/download/%{name}-%{version}.tar.bz2
|
||||||
@ -120,6 +120,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_datadir}/aclocal/libcurl.m4
|
%{_datadir}/aclocal/libcurl.m4
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 09 2008 Jindrich Novy <jnovy@redhat.com> 7.18.2-7
|
||||||
|
- update the thread safety patch, thanks to Rob Crittenden (#462217)
|
||||||
|
|
||||||
* Wed Sep 03 2008 Warren Togami <wtogami@redhat.com> 7.18.2-6
|
* Wed Sep 03 2008 Warren Togami <wtogami@redhat.com> 7.18.2-6
|
||||||
- add thread safety to libcurl NSS cleanup() functions (#459297)
|
- add thread safety to libcurl NSS cleanup() functions (#459297)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user