[zorp-hu] python2.3 es zorp 2.0 gpl

Balazs Scheidler zorp-hu@lists.balabit.hu
Fri, 06 Aug 2004 20:04:18 +0200


--=-9YHu2Glt4NAYe6bTQ+tO
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

ez a patch kell hozza.
-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1


--=-9YHu2Glt4NAYe6bTQ+tO
Content-Disposition: inline
Content-Description: Forwarded message - Re: [zorp] Zorp 2.1.5.5 can't
	handle load
Content-Type: message/rfc822

Subject: Re: [zorp] Zorp 2.1.5.5 can't handle load
From: Balazs Scheidler <bazsi@balabit.hu>
To: zorp@lists.balabit.hu
In-Reply-To: <1085162026.21615.1.camel@axl.seasidesoftware.co.za>
References: <1085086271.27005.34.camel@axl.seasidesoftware.co.za>
	 <1085122534.574.1.camel@bzorp.balabit>
	 <1085128623.645.0.camel@bzorp.balabit>
	 <1085162026.21615.1.camel@axl.seasidesoftware.co.za>
Content-Type: text/plain; charset=iso-8859-2
Message-Id: <1085177475.580.1.camel@bzorp.balabit>
Mime-Version: 1.0
Date: Sat, 22 May 2004 00:11:15 +0200
Content-Transfer-Encoding: 8bit

2004-05-21, p keltezéssel 19:53-kor Sheldon Hearn ezt írta:
> On Fri, 2004-05-21 at 10:37, Balazs Scheidler wrote:
> 
> > > chances are that you are using python2.3 and zorp 2.1. there was a
> > > locking issue looking similar what you have, the fix was included in
> > > 2.1.7.1, I'm not in the office right now but I can provide a broken down
> > > patch if you need that. (though upgrading to 2.1.7.1 should help too)
> > 
> > So the above fix should solve your SIGSEGV issue with HTTP, I will
> > explain your possibilities with load in the next mail.
> 
> I see only 2.1.7 available for download at
> http://www.balabit.com/downloads/zorp/2.1/src/, and it does not fix the
> SIGSEGV issue with HTTP.
> 
> # /usr/lib/zorp/zorp --version
> Zorp 2.1.7
> Compile-Date: May 21 2004 08:32:20
> Config-Date: 2004/05/21
> Trace: on
> Debug: on
> IPOptions: off
> IPFilter-Tproxy: off
> Netfilter-Tproxy: on
> Netfilter-Linux22-Fallback: on
> Linux22-Tproxy: off
> Conntrack: on

This is the patch that was incorporated in 2.1.7.1, but the GPL version
has not been released yet.
Index: zorp-core/lib/proxyvars.c
diff -u zorp-core/lib/proxyvars.c:1.10.2.1 zorp-core/lib/proxyvars.c:1.10.2.2
--- zorp-core/lib/proxyvars.c:1.10.2.1	Wed Aug  6 09:46:06 2003
+++ zorp-core/lib/proxyvars.c	Fri Apr 30 13:00:08 2004
@@ -742,19 +742,21 @@
       break;
     case Z_VAR_TYPE_METHOD:
       {
-	ZorpMethod *zm;
 	ZProxy *proxy;
 
 	proxy = va_arg(l, ZProxy *);
-	zm = z_py_zorp_method_new(proxy, va_arg(l, ZProxyMethodFunc));
-	e->value = zm;
+	z_python_lock();
+	e->value = z_py_zorp_method_new(proxy, va_arg(l, ZProxyMethodFunc));
+	z_python_unlock();
 	e->free = z_proxy_vars_method_free;
 	e->getvar = z_proxy_vars_method_get;
 	break;
       }
     case Z_VAR_TYPE_HASH:
 
+      z_python_lock();
       e->value = z_py_zorp_hash_new((GHashTable *) va_arg(l, gpointer));
+      z_python_unlock();
       e->free = z_proxy_vars_hash_free;
       e->getvar = z_proxy_vars_hash_get;
       break;
@@ -766,8 +768,9 @@
       e->free = va_arg(l, gpointer);
       break;
     case Z_VAR_TYPE_DIMHASH:
-
+      z_python_lock();
       e->value = z_py_zorp_dimhash_new((ZDimHashTable *) va_arg(l, gpointer));
+      z_python_unlock();
       e->free = z_proxy_vars_dimhash_free;
       e->getvar = z_proxy_vars_dimhash_get;
       break;


-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1


--=-9YHu2Glt4NAYe6bTQ+tO--