]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
add Manhole to queen (port 8021), also change manhole namespace to just have 'app...
authorBrian Warner <warner@lothar.com>
Fri, 1 Dec 2006 00:30:45 +0000 (17:30 -0700)
committerBrian Warner <warner@lothar.com>
Fri, 1 Dec 2006 00:30:45 +0000 (17:30 -0700)
allmydata/manhole.py
allmydata/queen.py

index 2ab39c601d25541530bf817124b7580c5e4d8ebf..1fbfd3213e635fb2ed4a50dbd05d9dfb215b2c47 100644 (file)
@@ -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
 
index 79d7db4aea65dd899716d48d5cdee1a87a6df8b2..a06f90b4208dbc505c99857c4fb0372baa278ad3 100644 (file)
@@ -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]