From: Daira Hopwood Date: Tue, 27 Jan 2015 17:55:44 +0000 (+0000) Subject: Add an assertion that manhole code is passed an absolute path for authorized_keys... X-Git-Url: https://git.rkrishnan.org/somewhere?a=commitdiff_plain;h=2caae38a0f683b04dd31eb1bcf43770b51e1f870;p=tahoe-lafs%2Ftahoe-lafs.git Add an assertion that manhole code is passed an absolute path for authorized_keys. refs #2235 Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/manhole.py b/src/allmydata/manhole.py index b3321e8e..63b62a54 100644 --- a/src/allmydata/manhole.py +++ b/src/allmydata/manhole.py @@ -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):