From: Brian Warner Date: Fri, 1 Dec 2006 00:30:45 +0000 (-0700) Subject: add Manhole to queen (port 8021), also change manhole namespace to just have 'app... X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~532 X-Git-Url: https://git.rkrishnan.org/?a=commitdiff_plain;h=cc86df067b720814847ac07a53915311c3bb3449;p=tahoe-lafs%2Ftahoe-lafs.git add Manhole to queen (port 8021), also change manhole namespace to just have 'app' (for both queen and client) --- diff --git a/allmydata/manhole.py b/allmydata/manhole.py index 2ab39c60..1fbfd321 100644 --- a/allmydata/manhole.py +++ b/allmydata/manhole.py @@ -123,9 +123,8 @@ class _BaseManhole(service.MultiService): def makeNamespace(): # close over 'self' so we can get access to .parent later - client = self.parent namespace = { - 'client': client, + 'app': self.parent, } return namespace diff --git a/allmydata/queen.py b/allmydata/queen.py index 79d7db4a..a06f90b4 100644 --- a/allmydata/queen.py +++ b/allmydata/queen.py @@ -12,6 +12,7 @@ class Roster(service.MultiService, Referenceable): class Queen(service.MultiService): CERTFILE = "queen.pem" PORTNUMFILE = "queen.port" + AUTHKEYSFILE = "authorized_keys" def __init__(self): service.MultiService.__init__(self) @@ -31,6 +32,11 @@ class Queen(service.MultiService): # any services with the Tub until after that point self.tub.setServiceParent(self) self.urls = {} + if os.path.exists(self.AUTHKEYSFILE): + from allmydata import manhole + m = manhole.AuthorizedKeysManhole(8021, self.AUTHKEYSFILE) + m.setServiceParent(self) + log.msg("AuthorizedKeysManhole listening on 8021") def _setup_tub(self, local_ip): l = self.tub.getListeners()[0]