mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-07 10:56:49 +00:00
manhole: be more tolerant of authorized_keys. files in .tahoe
both peter and I independently tried to do the same thing to eliminate the authorized_keys file which was causing problems with the broken mac build (c.f. #522) namely mv authorized_keys.8223{,.bak} but the node is, ahem, let's say 'intolerant' of the trailing .bak - rather than disable the manhole as one might expect, it instead causes the node to explode on startup. this patch makes it skip over anything that doesn't pass the 'parse this trailing stuff as an int' test.
This commit is contained in:
parent
00aa75d1e8
commit
90e3f37173
@ -92,11 +92,15 @@ class Node(service.MultiService):
|
||||
for f in os.listdir(self.basedir):
|
||||
if f.startswith(AUTHKEYSFILEBASE):
|
||||
keyfile = os.path.join(self.basedir, f)
|
||||
portnum = int(f[len(AUTHKEYSFILEBASE):])
|
||||
from allmydata import manhole
|
||||
m = manhole.AuthorizedKeysManhole(portnum, keyfile)
|
||||
m.setServiceParent(self)
|
||||
self.log("AuthorizedKeysManhole listening on %d" % portnum)
|
||||
try:
|
||||
portnum = int(f[len(AUTHKEYSFILEBASE):])
|
||||
except ValueError:
|
||||
self.log("AuthorizedKeysManhole malformed file name %s" % (f,))
|
||||
else:
|
||||
from allmydata import manhole
|
||||
m = manhole.AuthorizedKeysManhole(portnum, keyfile)
|
||||
m.setServiceParent(self)
|
||||
self.log("AuthorizedKeysManhole listening on %d" % portnum)
|
||||
|
||||
self.setup_logging()
|
||||
self.log("Node constructed. " + get_package_versions_string())
|
||||
|
Loading…
x
Reference in New Issue
Block a user