From cc86df067b720814847ac07a53915311c3bb3449 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 30 Nov 2006 17:30:45 -0700 Subject: [PATCH] add Manhole to queen (port 8021), also change manhole namespace to just have 'app' (for both queen and client) --- allmydata/manhole.py | 3 +-- allmydata/queen.py | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) 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] -- 2.45.2