update to last snapshot, and apply a (homegrown) patch which tries to

work around the limitations of the security-patched SimpleXMLRPCServer
This commit is contained in:
drochner 2005-02-04 17:24:16 +00:00
parent 93e603a0c1
commit d8966b59b6
4 changed files with 61 additions and 13 deletions

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.2 2005/01/23 20:41:48 recht Exp $
# $NetBSD: Makefile,v 1.3 2005/02/04 17:24:16 drochner Exp $
#
DISTNAME= kenosis-0.92
PKGNAME= ${PYPKGPREFIX}-kenosis-0.92
DISTNAME= kenosis-0.941
PKGNAME= ${PYPKGPREFIX}-kenosis-0.94.1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=kenosis/}

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2005/01/13 12:55:32 drochner Exp $
@comment $NetBSD: PLIST,v 1.2 2005/02/04 17:24:16 drochner Exp $
${PYSITELIB}/bt/BitTorrent/Choker.py
${PYSITELIB}/bt/BitTorrent/Choker.pyc
${PYSITELIB}/bt/BitTorrent/Choker.pyo
@ -212,9 +212,6 @@ ${PYSITELIB}/ds/testall.pyo
${PYSITELIB}/ds/ui.py
${PYSITELIB}/ds/ui.pyc
${PYSITELIB}/ds/ui.pyo
${PYSITELIB}/ds/weakmethod.py
${PYSITELIB}/ds/weakmethod.pyc
${PYSITELIB}/ds/weakmethod.pyo
${PYSITELIB}/kenosis/__init__.py
${PYSITELIB}/kenosis/__init__.pyc
${PYSITELIB}/kenosis/__init__.pyo
@ -236,9 +233,9 @@ ${PYSITELIB}/kenosis/dns/kenosisdns.tac.pyo
${PYSITELIB}/kenosis/dnstest.py
${PYSITELIB}/kenosis/dnstest.pyc
${PYSITELIB}/kenosis/dnstest.pyo
${PYSITELIB}/kenosis/kim.py
${PYSITELIB}/kenosis/kim.pyc
${PYSITELIB}/kenosis/kim.pyo
${PYSITELIB}/kenosis/kwebd.py
${PYSITELIB}/kenosis/kwebd.pyc
${PYSITELIB}/kenosis/kwebd.pyo
${PYSITELIB}/kenosis/node.py
${PYSITELIB}/kenosis/node.pyc
${PYSITELIB}/kenosis/node.pyo

View file

@ -1,4 +1,5 @@
$NetBSD: distinfo,v 1.1.1.1 2005/01/13 12:55:32 drochner Exp $
$NetBSD: distinfo,v 1.2 2005/02/04 17:24:16 drochner Exp $
SHA1 (kenosis-0.92.tar.gz) = 14fc962807776b6e291af2bf79f3a1a13c9888c2
Size (kenosis-0.92.tar.gz) = 107101 bytes
SHA1 (kenosis-0.941.tar.gz) = ef2e344564fcc6270cf363773a21eef8919f7b7d
Size (kenosis-0.941.tar.gz) = 111099 bytes
SHA1 (patch-aa) = e3f5661c8fd13caff9aba6d801c63390e05511bd

View file

@ -0,0 +1,50 @@
$NetBSD: patch-aa,v 1.1 2005/02/04 17:24:16 drochner Exp $
--- kenosis/node.py.orig 2005-02-04 17:40:36.000000000 +0100
+++ kenosis/node.py
@@ -309,7 +309,8 @@ class NullHandler:
class NodeRpcFrontend:
def __init__(self, nodeKernel):
self.nodeKernel_ = nodeKernel
- self.kenosis = RpcServerAdapter(
+ self.services = {}
+ self.services["kenosis"] = RpcServerAdapter(
adaptee=NodeRpcFilter(nodeKernel=nodeKernel),
nodeKernel=self.nodeKernel_, serviceName="kenosis")
@@ -319,22 +320,28 @@ class NodeRpcFrontend:
def registerNamedHandler(self, name, handler):
if nameIsPrivate(name=name):
raise Exception("invalid handler: %s" % name)
- setattr(
- self, name,
- RpcServerAdapter(adaptee=handler, nodeKernel=self.nodeKernel_, serviceName=name))
+ self.services[name] = \
+ RpcServerAdapter(adaptee=handler, nodeKernel=self.nodeKernel_, serviceName=name)
+
+ def _dispatch(self, name, args):
+ (sname, rest) = name.split('.', 1)
+ fn = SimpleXMLRPCServer.resolve_dotted_attribute(
+ self.services[sname], rest)
+ return fn(*args)
+
def _listMethods(self):
ret = []
- for attrName in dir(self):
- attr = getattr(self, attrName)
+ for attrName in keys(self.services):
+ attr = self.services[attrName]
if isinstance(attr, RpcServerAdapter):
for methodName in attr._listPublicMethod():
ret.append("%s.%s" % (attrName, methodName))
return ret
def _methodHelp(self, method):
- for attrName in dir(self):
- attr = getattr(self, attrName)
+ for attrName in keys(self.services):
+ attr = self.services[attrName]
if isinstance(attr, RpcServerAdapter):
for methodName in attr._listPublicMethod():
n = "%s.%s" % (attrName, methodName)