Skip to content

Commit

Permalink
Get the right home directory into the Conch user.
Browse files Browse the repository at this point in the history
  • Loading branch information
exarkun committed Jul 1, 2014
1 parent 20e714d commit 2f9b9d4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions flocker/testtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,11 @@ class UnixSSHRealm(object):
An ``IRealm`` for a Conch server which gives out ``_FixedHomeConchUser``
users.
"""
def __init__(self, home):
self.home = home

def requestAvatar(self, username, mind, *interfaces):
user = _FixedHomeConchUser(username)
user = _FixedHomeConchUser(username, self.home)
return interfaces[0], user, user.logout


Expand Down Expand Up @@ -439,7 +442,7 @@ def __init__(self, base_path):
b"-q"])

factory = OpenSSHFactory()
realm = UnixSSHRealm()
realm = UnixSSHRealm(self.home)
checker = _InMemoryPublicKeyChecker(public_key=key.public())
factory.portal = Portal(realm, [checker])
factory.dataRoot = sshd_path.path
Expand Down

0 comments on commit 2f9b9d4

Please sign in to comment.