summaryrefslogtreecommitdiffhomepage
path: root/auth_transport.py
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2003-11-10 04:54:02 +0000
committerRobey Pointer <robey@lag.net>2003-11-10 04:54:02 +0000
commitaad7b859f194451a0529c4d8aa20cdc724ae33a2 (patch)
tree24b19c05626e547f3f3bc4a12c7a8c64578dbed5 /auth_transport.py
parent0e1ef2c65c80bd76eb62f5dfd953cb987d36ce3a (diff)
[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-7]
cleaned up server code, renamed some files & classes renamed demo-server.py and demo-host-key to demo_server.py and demo_host_key, just to be consistent. renamed SSHException -> SecshException. generalized the mechanism where Channel decides whether to allow different channel requests: 4 of the main ones (pty, window-change, shell, and subsystem) go through easily override-able methods now. you could probably make an actual ssh shell server. gave ChannelFile a repr(). turned off ultra debugging in the demos. demo_server creates a subclass of Channel to allow pty/shell and sets an event when the shell request is made, so that it knows when it can start sending the fake bbs. renamed to charmander and updated some of the distutils files.
Diffstat (limited to 'auth_transport.py')
-rw-r--r--auth_transport.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/auth_transport.py b/auth_transport.py
index 78ce8d70..13b4a23c 100644
--- a/auth_transport.py
+++ b/auth_transport.py
@@ -4,7 +4,7 @@ from transport import BaseTransport
from transport import MSG_SERVICE_REQUEST, MSG_SERVICE_ACCEPT, MSG_USERAUTH_REQUEST, MSG_USERAUTH_FAILURE, \
MSG_USERAUTH_SUCCESS, MSG_USERAUTH_BANNER
from message import Message
-from secsh import SSHException
+from secsh import SecshException
from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL
DISCONNECT_SERVICE_NOT_AVAILABLE, DISCONNECT_AUTH_CANCELLED_BY_USER, \
@@ -34,7 +34,7 @@ class Transport(BaseTransport):
def auth_key(self, username, key, event):
if (not self.active) or (not self.initial_kex_done):
# we should never try to send the password unless we're on a secure link
- raise SSHException('No existing session')
+ raise SecshException('No existing session')
try:
self.lock.acquire()
self.auth_event = event
@@ -49,7 +49,7 @@ class Transport(BaseTransport):
'authenticate using a password; event is triggered on success or fail'
if (not self.active) or (not self.initial_kex_done):
# we should never try to send the password unless we're on a secure link
- raise SSHException('No existing session')
+ raise SecshException('No existing session')
try:
self.lock.acquire()
self.auth_event = event
@@ -108,7 +108,7 @@ class Transport(BaseTransport):
m.add_string(str(self.private_key))
m.add_string(self.private_key.sign_ssh_session(self.randpool, self.H, self.username))
else:
- raise SSHException('Unknown auth method "%s"' % self.auth_method)
+ raise SecshException('Unknown auth method "%s"' % self.auth_method)
self.send_message(m)
else:
self.log(DEBUG, 'Service request "%s" accepted (?)' % service)