diff --git a/Makefile b/Makefile index 6bdbe03..507f9fe 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ always: clean: rm -rf build dist - rm -f MANIFEST *.log + rm -f MANIFEST *.log demos/*.log # places where the version number is stored: # diff --git a/README b/README index 5608172..30c2795 100644 --- a/README +++ b/README @@ -257,4 +257,6 @@ v1.0 JIGGLYPUFF * SFTPClient.set_size * remove @since that predate 1.0 * put examples in examples/ folder +* support .ssh/known_hosts files made with HashKnownHosts +* sftp server mode should convert all paths to unicode before calling into sftp_si diff --git a/paramiko/agent.py b/paramiko/agent.py index 3555512..f496c0b 100644 --- a/paramiko/agent.py +++ b/paramiko/agent.py @@ -59,8 +59,8 @@ class Agent: conn = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) conn.connect(os.environ['SSH_AUTH_SOCK']) self.conn = conn - type, result = self._send_message(chr(SSH2_AGENTC_REQUEST_IDENTITIES)) - if type != SSH2_AGENT_IDENTITIES_ANSWER: + ptype, result = self._send_message(chr(SSH2_AGENTC_REQUEST_IDENTITIES)) + if ptype != SSH2_AGENT_IDENTITIES_ANSWER: raise SSHException('could not get keys from ssh-agent') keys = [] for i in range(result.get_int()): @@ -132,7 +132,7 @@ class AgentKey(PKey): msg.add_string(self.blob) msg.add_string(data) msg.add_int(0) - type, result = self.agent._send_message(msg) - if type != SSH2_AGENT_SIGN_RESPONSE: + ptype, result = self.agent._send_message(msg) + if ptype != SSH2_AGENT_SIGN_RESPONSE: raise SSHException('key cannot be used for signing') return result.get_string() diff --git a/paramiko/auth_handler.py b/paramiko/auth_handler.py index 59aa376..45b6015 100644 --- a/paramiko/auth_handler.py +++ b/paramiko/auth_handler.py @@ -45,6 +45,8 @@ class AuthHandler (object): self.auth_method = '' self.password = None self.private_key = None + self.interactive_handler = None + self.submethods = None # for server mode: self.auth_username = None self.auth_fail_count = 0 diff --git a/paramiko/sftp_file.py b/paramiko/sftp_file.py index bdc60c7..07067fb 100644 --- a/paramiko/sftp_file.py +++ b/paramiko/sftp_file.py @@ -20,6 +20,7 @@ L{SFTPFile} """ +import socket import threading from paramiko.common import * from paramiko.sftp import * @@ -76,7 +77,7 @@ class SFTPFile (BufferedFile): except EOFError: # may have outlived the Transport connection pass - except IOError: + except (IOError, socket.error): # may have outlived the Transport connection pass