Exemple #1
0
 def __init__(self, repo, db):
     ConchUser.__init__(self)
     self.repo = repo
     self.db = db
     self.channelLookup.update(
         {b'fzone-chan': FZoneChanServerChannel,
          b'fzone-blob': FZoneBlobServerChannel})
Exemple #2
0
 def __init__(self, user_id):
     ConchUser.__init__(self)
     self.user_id = user_id
     self.avatar_id = uuid.uuid4().hex
     self.channelLookup.update({'session': SSHSession})
     self.terminal = None
     self.term_size = (20, 80)
     self.ssh_protocol = None
Exemple #3
0
 def __init__(self, avatarId):
     assert self.protocolFactory is not None, (
         "When subclassing SSHBaseAvatar, set the "
         "`protocolFactory` attribute to a protocol factory`.  "
         "E.g. `SSHDemoProtocolFactory`")
     ConchUser.__init__(self)
     self.avatarId = avatarId
     self.channelLookup.update({'session': SSHSession})
Exemple #4
0
    def __init__(self, username, root):
        ConchUser.__init__(self)
        self.username = username
        self.filesystem = pathutils.FileSystem(root)

        self.listeners = {}  # dict mapping (interface, port) -> listener
        self.channelLookup.update({"session": session.SSHSession})
        self.subsystemLookup.update({"sftp": FileTransferServer})
Exemple #5
0
    def __init__(self, username, root):
        ConchUser.__init__(self)
        self.username = username
        self.filesystem = pathutils.FileSystem(root)

        self.listeners = {}  # dict mapping (interface, port) -> listener
        self.channelLookup.update(
                {"session": session.SSHSession})
        self.subsystemLookup.update(
                {"sftp": FileTransferServer})
Exemple #6
0
    def __init__(self, siteId, cwd, uid):
        ConchUser.__init__(self)

        # Allow the user to open a channel of type session.  This implementation
        # will look up the ISession adapter for this site and use the resulting
        # object to authorize any SSH actions.
        self.channelLookup['session'] = SSHSession

        self.siteId = siteId
        self.cwd = cwd
        self.uid = uid
Exemple #7
0
 def __init__(self, username, authnz, vcs_config):
     ConchUser.__init__(self)
     self.username = username
     self.authnz = authnz
     self.vcs_config = vcs_config
     self.channelLookup.update({"session": VCSSession})
     self.shell = {}
     # Find git-shell path.
     # Adapted from http://bugs.python.org/file15381/shutil_which.patch
     self.path = os.environ.get("PATH", os.defpath)
     self.shell['git'] = self._shells_find('git-shell')
     # self.shell['hd'] = self._shells_find('hg')
     self.shell['hg'] = '/usr/local/bin/hg'
Exemple #8
0
    def __init__(self, username):
        ConchUser.__init__(self)
        self.username = username
        self.pwdData = pwd.getpwnam(self.username)
        l = [self.pwdData[3]]
        for groupname, password, gid, userlist in grp.getgrall():
            if username in userlist:
                l.append(gid)
        self.otherGroups = l
        self.listeners = {}  # Dict mapping (interface, port) -> listener
        self.channelLookup.update(
                {b"session": session.SSHSession,
                 b"direct-tcpip": forwarding.openConnectForwardingClient})

        self.subsystemLookup.update(
                {b"sftp": filetransfer.FileTransferServer})
Exemple #9
0
    def __init__(self, username):
        ConchUser.__init__(self)
        self.username = username
        self.pwdData = pwd.getpwnam(self.username)
        l = [self.pwdData[3]]
        for groupname, password, gid, userlist in grp.getgrall():
            if username in userlist:
                l.append(gid)
        self.otherGroups = l
        self.listeners = {}  # Dict mapping (interface, port) -> listener
        self.channelLookup.update(
                {"session": session.SSHSession,
                 "direct-tcpip": forwarding.openConnectForwardingClient})

        self.subsystemLookup.update(
                {"sftp": filetransfer.FileTransferServer})
Exemple #10
0
 def __init__(self):
     ConchUser.__init__(self)
     self.channelLookup['session'] = SSHSession
Exemple #11
0
 def __init__(self, root=None):
     ConchUser.__init__(self)
     self.channelLookup["session"] = ShelllessSession
Exemple #12
0
 def __init__(self, settings, username, api_key):
     ConchUser.__init__(self)
     self.settings = settings
     self.username = username
     self.api_key = api_key
     self.channelLookup['session'] = SSHSession
 def __init__(self, username, meta):
     ConchUser.__init__(self)
     self.username = username
     self.channelLookup.update({"session": SSHSession})
     self.meta = meta
Exemple #14
0
 def __init__(self):
     ConchUser.__init__(self)
     self.channelLookup[b'session'] = session.SSHSession
     self.subsystemLookup[b'sftp'] = filetransfer.FileTransferServer
Exemple #15
0
 def __init__(self, root=None):
     ConchUser.__init__(self)
     self.channelLookup["session"] = ShelllessSession
Exemple #16
0
 def __init__(self, original, username):
     components.Adapter.__init__(self, original)
     ConchUser.__init__(self)
     self.username = username
     self.channelLookup.update({'session': FixedSSHSession})
     self.subsystemLookup.update({'sftp': FileTransferServer})
Exemple #17
0
 def __init__(self, username, meta):
     ConchUser.__init__(self)
     self.username = username
     self.channelLookup.update({"session": SSHSession})
     self.meta = meta
Exemple #18
0
 def __init__(self, key):
     ConchUser.__init__(self)
     # django, authentication model instance for logged in avatar
     self.user = key.user
     self.project = key.project
     self.channelLookup['session'] = GatewaySession
Exemple #19
0
 def __init__(self):
     ConchUser.__init__(self)
     self.channelLookup.update({ 'session': SSHSession })
Exemple #20
0
 def __init__(self, username):
     ConchUser.__init__(self)
     self.channelLookup.update({'session': session.SSHSession})
     self.username = username
     self.listeners = {}
Exemple #21
0
 def __init__(self, username, datapath):
     ConchUser.__init__(self)
     self.username = username
     self.datapath = datapath
     self.channelLookup["session"] = SSHSession
 def __init__(self, avatarId):
     ConchUser.__init__(self)
     self.email, self.pydas, self.url = avatarId
     self.channelLookup['session'] = SSHSession
     self.subsystemLookup.update(
             {'sftp': MidasFileTransferServer})
Exemple #23
0
 def __init__(self, avatarId):
     ConchUser.__init__(self)
     self.avatarId = avatarId
     self.channelLookup['session'] = session.SSHSession
Exemple #24
0
 def __init__(self, username):
     ConchUser.__init__(self)
     self.username = username
     self.channelLookup.update({"session": GitProcessProtocolSession})
Exemple #25
0
 def __init__(self, avatarId):
     ConchUser.__init__(self)
     self.avatarId = avatarId
     self.channelLookup['session'] = session.SSHSession
Exemple #26
0
 def __init__(self):
     ConchUser.__init__(self)
     self.channelLookup.update({'session': SSHSession})
Exemple #27
0
 def __init__(self):
     ConchUser.__init__(self)
     self.channelLookup['session'] = SSHSession
Exemple #28
0
 def __init__(self, username, datapath):
     ConchUser.__init__(self)
     self.username = username
     self.datapath = datapath
     self.channelLookup["session"] = SSHSession