From 6747d9944af483796890809b37a9cb260e08ee6d Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Sat, 27 Apr 2013 20:50:29 -0700 Subject: Changelog re #87 --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 2bb5341f..2b498987 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,10 @@ v1.11.0 (DD MM YYYY) dependent on ctypes for constructing appropriate structures and had ctypes implementations of all functionality. Thanks to Jason R. Coombs for the patch. +* #87: Ensure updates to `known_hosts` files account for any updates to said + files after Paramiko initially read them. (Includes related fix to guard + against duplicate entries during subsequent `known_hosts` loads.) Thanks to + `@sunweaver` for the contribution. v1.10.1 (5th Apr 2013) ---------------------- -- cgit v1.2.3 From 3966ac103c988218be02371803817b66b4deab17 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Sat, 27 Apr 2013 22:12:24 -0700 Subject: Changelog re #146 (also start 10.10.2 section) --- NEWS | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 7a983baf..1bb2d37d 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,12 @@ Issues noted as "Fabric #NN" can be found at https://github.com/fabric/fabric/. Releases ======== +v1.10.2 (DD MM 2013) +-------------------- + +* #146: Indentation fixes for readability. Thanks to Abhinav Upadhyay for catch + & patch. + v1.10.1 (5th Apr 2013) ---------------------- -- cgit v1.2.3 From aee2355d24277405867a8cb4ce8ce9616fee9d5b Mon Sep 17 00:00:00 2001 From: Ethan Glasser-Camp Date: Mon, 25 Mar 2013 14:35:24 -0400 Subject: Warn on parse failure when reading known_hosts --- NEWS | 2 ++ paramiko/hostkeys.py | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 1bb2d37d..efee92d9 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,8 @@ Releases v1.10.2 (DD MM 2013) -------------------- +* #153, #67: Warn on parse failure when reading known_hosts + file. Thanks to `@glasserc` for patch. * #146: Indentation fixes for readability. Thanks to Abhinav Upadhyay for catch & patch. diff --git a/paramiko/hostkeys.py b/paramiko/hostkeys.py index e739312a..c54d2e74 100644 --- a/paramiko/hostkeys.py +++ b/paramiko/hostkeys.py @@ -28,6 +28,7 @@ import UserDict from paramiko.common import * from paramiko.dsskey import DSSKey from paramiko.rsakey import RSAKey +from paramiko.util import get_logger class InvalidHostKey(Exception): @@ -48,7 +49,7 @@ class HostKeyEntry: self.hostnames = hostnames self.key = key - def from_line(cls, line): + def from_line(cls, line, lineno=None): """ Parses the given line of text to find the names for the host, the type of key, and the key data. The line is expected to be in the @@ -61,9 +62,12 @@ class HostKeyEntry: @param line: a line from an OpenSSH known_hosts file @type line: str """ + log = get_logger('paramiko.hostkeys') fields = line.split(' ') if len(fields) < 3: # Bad number of fields + log.warn("Not enough fields found in known_hosts in line %s (%r)" % + (lineno, line)) return None fields = fields[:3] @@ -78,6 +82,7 @@ class HostKeyEntry: elif keytype == 'ssh-dss': key = DSSKey(data=base64.decodestring(key)) else: + log.warn("Unable to handle key of type %s" % (keytype,)) return None except binascii.Error, e: raise InvalidHostKey(line, e) @@ -160,11 +165,11 @@ class HostKeys (UserDict.DictMixin): @raise IOError: if there was an error reading the file """ f = open(filename, 'r') - for line in f: + for lineno, line in enumerate(f): line = line.strip() if (len(line) == 0) or (line[0] == '#'): continue - e = HostKeyEntry.from_line(line) + e = HostKeyEntry.from_line(line, lineno) if e is not None: self._entries.append(e) f.close() -- cgit v1.2.3 From 8c7f120c2cfb119ece27b4eea375de10ef5df554 Mon Sep 17 00:00:00 2001 From: Ethan Glasser-Camp Date: Mon, 25 Mar 2013 14:35:24 -0400 Subject: Warn on parse failure when reading known_hosts --- NEWS | 2 ++ paramiko/hostkeys.py | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 1bb2d37d..efee92d9 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,8 @@ Releases v1.10.2 (DD MM 2013) -------------------- +* #153, #67: Warn on parse failure when reading known_hosts + file. Thanks to `@glasserc` for patch. * #146: Indentation fixes for readability. Thanks to Abhinav Upadhyay for catch & patch. diff --git a/paramiko/hostkeys.py b/paramiko/hostkeys.py index e739312a..c54d2e74 100644 --- a/paramiko/hostkeys.py +++ b/paramiko/hostkeys.py @@ -28,6 +28,7 @@ import UserDict from paramiko.common import * from paramiko.dsskey import DSSKey from paramiko.rsakey import RSAKey +from paramiko.util import get_logger class InvalidHostKey(Exception): @@ -48,7 +49,7 @@ class HostKeyEntry: self.hostnames = hostnames self.key = key - def from_line(cls, line): + def from_line(cls, line, lineno=None): """ Parses the given line of text to find the names for the host, the type of key, and the key data. The line is expected to be in the @@ -61,9 +62,12 @@ class HostKeyEntry: @param line: a line from an OpenSSH known_hosts file @type line: str """ + log = get_logger('paramiko.hostkeys') fields = line.split(' ') if len(fields) < 3: # Bad number of fields + log.warn("Not enough fields found in known_hosts in line %s (%r)" % + (lineno, line)) return None fields = fields[:3] @@ -78,6 +82,7 @@ class HostKeyEntry: elif keytype == 'ssh-dss': key = DSSKey(data=base64.decodestring(key)) else: + log.warn("Unable to handle key of type %s" % (keytype,)) return None except binascii.Error, e: raise InvalidHostKey(line, e) @@ -160,11 +165,11 @@ class HostKeys (UserDict.DictMixin): @raise IOError: if there was an error reading the file """ f = open(filename, 'r') - for line in f: + for lineno, line in enumerate(f): line = line.strip() if (len(line) == 0) or (line[0] == '#'): continue - e = HostKeyEntry.from_line(line) + e = HostKeyEntry.from_line(line, lineno) if e is not None: self._entries.append(e) f.close() -- cgit v1.2.3 From c8b75a489c569ea71b2166c6fbcc7f773397da3b Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 26 Jul 2013 15:04:16 -0700 Subject: Update changelog for release --- NEWS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'NEWS') diff --git a/NEWS b/NEWS index efee92d9..0ad9f6b4 100644 --- a/NEWS +++ b/NEWS @@ -12,11 +12,11 @@ Issues noted as "Fabric #NN" can be found at https://github.com/fabric/fabric/. Releases ======== -v1.10.2 (DD MM 2013) --------------------- +v1.10.2 (26th Jul 2013) +----------------------- -* #153, #67: Warn on parse failure when reading known_hosts - file. Thanks to `@glasserc` for patch. +* #153, #67: Warn on parse failure when reading known_hosts file. Thanks to + `@glasserc` for patch. * #146: Indentation fixes for readability. Thanks to Abhinav Upadhyay for catch & patch. -- cgit v1.2.3 From f7d74d03d9f1f6ec10b0f7df3061384afdb61b48 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 20 Sep 2013 13:44:28 -0700 Subject: Changelog entry re #162 --- NEWS | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 0ad9f6b4..d052ebbd 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,13 @@ Issues noted as "Fabric #NN" can be found at https://github.com/fabric/fabric/. Releases ======== +v1.10.3 (20th Sep 2013) +----------------------- + +* #162: Clean up HMAC module import to avoid deadlocks in certain uses of + SSHClient. Thanks to Gernot Hillier for the catch & suggested + fix. + v1.10.2 (26th Jul 2013) ----------------------- -- cgit v1.2.3 From 081b04116be29072695a54e52e74ca9879bf03f9 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 20 Sep 2013 13:58:29 -0700 Subject: Clone changelog entry for 1.11 --- NEWS | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 7f576633..1c59a935 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,13 @@ Issues noted as "Fabric #NN" can be found at https://github.com/fabric/fabric/. Releases ======== +v1.11.1 (20th Sep 2013) +----------------------- + +* #162: Clean up HMAC module import to avoid deadlocks in certain uses of + SSHClient. Thanks to Gernot Hillier for the catch & suggested + fix. + v1.10.3 (20th Sep 2013) ----------------------- -- cgit v1.2.3 From fa61f3c398068895e6a483e3ce1ccc684b18ff49 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 20 Sep 2013 14:13:08 -0700 Subject: Changelog re #36 --- NEWS | 2 ++ 1 file changed, 2 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index d052ebbd..07ab7994 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,8 @@ v1.10.3 (20th Sep 2013) * #162: Clean up HMAC module import to avoid deadlocks in certain uses of SSHClient. Thanks to Gernot Hillier for the catch & suggested fix. +* #36: Fix the port-forwarding demo to avoid file descriptor errors. Thanks to + Jonathan Halcrow for catch & patch. v1.10.2 (26th Jul 2013) ----------------------- -- cgit v1.2.3 From db9dfebca801efbfd3743d85d4f7916f3996f4f5 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 20 Sep 2013 14:46:32 -0700 Subject: Changelog re #168 --- NEWS | 2 ++ 1 file changed, 2 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 07ab7994..fadd878c 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,8 @@ v1.10.3 (20th Sep 2013) fix. * #36: Fix the port-forwarding demo to avoid file descriptor errors. Thanks to Jonathan Halcrow for catch & patch. +* #168: Update config handling to properly handle multiple 'localforward' and + 'remoteforward' keys. Thanks to Emre Yılmaz for the patch. v1.10.2 (26th Jul 2013) ----------------------- -- cgit v1.2.3 From b3c0fb463ab2ab7642ce5ddef09f1469887d845c Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 20 Sep 2013 14:47:29 -0700 Subject: Copy some 1.10.3 changes to 1.11.1 changelog --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 43d3af5a..55981ddf 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,10 @@ v1.11.1 (20th Sep 2013) * #162: Clean up HMAC module import to avoid deadlocks in certain uses of SSHClient. Thanks to Gernot Hillier for the catch & suggested fix. +* #168: Update config handling to properly handle multiple 'localforward' and + 'remoteforward' keys. Thanks to Emre Yılmaz for the patch. +* #36: Fix the port-forwarding demo to avoid file descriptor errors. Thanks to + Jonathan Halcrow for catch & patch. v1.10.3 (20th Sep 2013) ----------------------- -- cgit v1.2.3 From f783d4d818dba93177ac96b95251e18fcfe190cc Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 20 Sep 2013 18:09:59 -0700 Subject: LOL @ different ordering in different versions. WTB sphinx plz --- NEWS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 55981ddf..8affcd56 100644 --- a/NEWS +++ b/NEWS @@ -18,10 +18,10 @@ v1.11.1 (20th Sep 2013) * #162: Clean up HMAC module import to avoid deadlocks in certain uses of SSHClient. Thanks to Gernot Hillier for the catch & suggested fix. -* #168: Update config handling to properly handle multiple 'localforward' and - 'remoteforward' keys. Thanks to Emre Yılmaz for the patch. * #36: Fix the port-forwarding demo to avoid file descriptor errors. Thanks to Jonathan Halcrow for catch & patch. +* #168: Update config handling to properly handle multiple 'localforward' and + 'remoteforward' keys. Thanks to Emre Yılmaz for the patch. v1.10.3 (20th Sep 2013) ----------------------- -- cgit v1.2.3 From 8b983d9d3d9c91f321c3f18ecc8fa2e9343ce661 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 27 Sep 2013 16:10:56 -0700 Subject: Changelog re #179 --- NEWS | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index fadd878c..28a95cef 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,13 @@ Issues noted as "Fabric #NN" can be found at https://github.com/fabric/fabric/. Releases ======== +v1.10.4 (27th Sep 2013) +----------------------- + +* #179: Fix a missing variable causing errors when an ssh_config file has a + non-default AddressFamily set. Thanks to Ed Marshall & Tomaz Muraus for catch + & patch. + v1.10.3 (20th Sep 2013) ----------------------- -- cgit v1.2.3