]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Add an assertion that manhole code is passed an absolute path for authorized_keys...
authorDaira Hopwood <daira@jacaranda.org>
Tue, 27 Jan 2015 17:55:44 +0000 (17:55 +0000)
committerDaira Hopwood <daira@jacaranda.org>
Tue, 27 Jan 2015 17:55:44 +0000 (17:55 +0000)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/manhole.py

index b3321e8e41daf846a2cee1840fd34328922f1fe5..63b62a545a1b3148cbb1cd53661d418a630708ce 100644 (file)
@@ -12,6 +12,8 @@ from twisted.internet import protocol
 
 from zope.interface import implements
 
+from allmydata.util.fileutil import precondition_abspath
+
 # makeTelnetProtocol and _TelnetRealm are for the TelnetManhole
 
 class makeTelnetProtocol:
@@ -63,6 +65,7 @@ class AuthorizedKeysChecker(conchc.SSHPublicKeyDatabase):
     """
 
     def __init__(self, authorized_keys_file):
+        precondition_abspath(authorized_keys_file)
         self.authorized_keys_file = authorized_keys_file
 
     def checkKey(self, credentials):