From c191a5fea1993c0810ee18de1d2088d5099b2028 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Sep 24 2010 02:04:10 +0000 Subject: Revert mod_nss-wouldblock patch and Reset NSPR error before calling PR_Read() This should fix looping in #620856 --- 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 68bdabf..271fadf 100644 --- a/mod_nss.spec +++ b/mod_nss.spec @@ -1,6 +1,6 @@ Name: mod_nss Version: 1.0.8 -Release: 8%{?dist} +Release: 9%{?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 - 1.0.8-9 +- Revert mod_nss-wouldblock patch +- Reset NSPR error before calling PR_Read(). This should fix looping + in #620856 + * Fri Sep 17 2010 Rob Crittenden - 1.0.8-8 - Fix hang when handling large POST under some conditions (#620856)