[mod_nss/f13/master] Revert mod_nss-wouldblock patch and reset NSPR error before calling PR_Read(). This should fix loopi

rcritten rcritten at fedoraproject.org
Fri Sep 24 02:22:24 UTC 2010


commit c7a27475f650816cbf15627cdea7b619580832f9
Author: Rob Crittenden <rcritten at redhat.com>
Date:   Thu Sep 23 22:22:05 2010 -0400

    Revert mod_nss-wouldblock patch and reset NSPR error before calling PR_Read().
    This should fix looping in #620856

 mod_nss-reseterror.patch |   10 ++++++++++
 mod_nss-wouldblock.patch |    5 ++---
 mod_nss.spec             |    9 ++++++++-
 3 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/mod_nss-reseterror.patch b/mod_nss-reseterror.patch
new file mode 100644
index 0000000..73ac3e4
--- /dev/null
+++ b/mod_nss-reseterror.patch
@@ -0,0 +1,10 @@
+--- mod_nss-1.0.8.orig/nss_engine_io.c	2010-09-23 18:12:56.000000000 -0400
++++ mod_nss-1.0.8/nss_engine_io.c	2010-09-23 18:13:07.000000000 -0400
+@@ -348,6 +348,7 @@
+             break;
+         }
+ 
++        PR_SetError(0, 0);
+         rc = PR_Read(inctx->filter_ctx->pssl, buf + bytes, wanted - bytes);
+ 
+         if (rc > 0) {
diff --git a/mod_nss-wouldblock.patch b/mod_nss-wouldblock.patch
index 947133d..405b67a 100644
--- a/mod_nss-wouldblock.patch
+++ b/mod_nss-wouldblock.patch
@@ -1,12 +1,11 @@
 --- mod_nss-1.0.3.orig/nss_engine_io.c	2006-04-07 16:17:12.000000000 -0400
 +++ mod_nss-1.0.3/nss_engine_io.c	2009-02-17 22:51:44.000000000 -0500
-@@ -259,7 +259,9 @@
+@@ -259,7 +259,8 @@
           */
          if (APR_STATUS_IS_EAGAIN(inctx->rc) || APR_STATUS_IS_EINTR(inctx->rc)
                 || (inctx->rc == APR_SUCCESS && APR_BRIGADE_EMPTY(inctx->bb))) {
 -            return 0;
-+            nspr_filter_out_ctx_t *outctx = filter_ctx->outctx;
-+            inctx->rc = outctx->rc;
++            PR_SetError(PR_WOULD_BLOCK_ERROR, 0);
 +            return -1;
          }
  
diff --git a/mod_nss.spec b/mod_nss.spec
index 57e7b4a..6bcdd28 100644
--- a/mod_nss.spec
+++ b/mod_nss.spec
@@ -1,6 +1,6 @@
 Name: mod_nss
 Version: 1.0.8
-Release: 7%{?dist}
+Release: 8%{?dist}
 Summary: SSL/TLS module for the Apache HTTP server
 Group: System Environment/Daemons
 License: ASL 2.0
@@ -19,6 +19,7 @@ Patch3: mod_nss-wouldblock.patch
 Patch4: mod_nss-negotiate.patch
 Patch5: mod_nss-reverseproxy.patch
 Patch6: mod_nss-pcachesignal.h
+Patch7: mod_nss-reseterror.patch
 
 %description
 The mod_nss module provides strong cryptography for the Apache Web
@@ -34,6 +35,7 @@ security library.
 %patch4 -p1 -b .negotiate
 %patch5 -p1 -b .reverseproxy
 %patch6 -p1 -b .pcachesignal.h
+%patch7 -p1 -b .reseterror
 
 # Touch expression parser sources to prevent regenerating it
 touch nss_expr_*.[chyl]
@@ -118,6 +120,11 @@ fi
 %{_sbindir}/gencert
 
 %changelog
+* Thu Sep 23 2010 Rob Crittenden <rcritten at redhat.com> - 1.0.8-8
+- Revert mod_nss-wouldblock patch
+- Reset NSPR error before calling PR_Read(). This should fix looping
+  in #620856
+
 * Fri Sep 17 2010 Rob Crittenden <rcritten at redhat.com> - 1.0.8-7
 - Fix hang when handling large POST under some conditions (#620856)
 - Remove file requires on libnssckbi.so (requested by svidal)


More information about the scm-commits mailing list