Package: sshfp Version: 1.2.2-2 Severity: important Dear Maintainer,
In our environment, sshfp dies on every invocation with -------------------- Traceback (most recent call last): File "/usr/bin/sshfp", line 378, in <module> main() File "/usr/bin/sshfp", line 363, in main data = sshfp_from_file(khfile, args) File "/usr/bin/sshfp", line 129, in sshfp_from_file fingerprints.append(process_records(data, wantedHosts)) File "/usr/bin/sshfp", line 171, in process_records if not check_keytype(keytype): File "/usr/bin/sshfp", line 138, in check_keytype print >> sys.stderr, "Could only find key type %s for %s" % (keytype, hostname) NameError: global name 'hostname' is not defined -------------------- This is caused by a reference to the 'hostname' variable in def check_keytype on line 138, at which point that variable is not defined. The fix is trivial, here is a patch: -------------------- --- /usr/bin/sshfp.orig 2011-11-15 14:45:22.000000000 -0500 +++ /usr/bin/sshfp 2012-07-11 13:48:01.075725852 -0400 @@ -129,7 +129,7 @@ fingerprints.append(process_records(data, wantedHosts)) return "\n".join(fingerprints) -def check_keytype(keytype): +def check_keytype(keytype, hostname): global algos for algo in algos: if "ssh-%s" % algo[:-1] == keytype[:-1]: @@ -141,7 +141,7 @@ def process_record(record, hostname): (host, keytype, key) = record.split(" ") key = key.rstrip() - if check_keytype(keytype): + if check_keytype(keytype, hostname): record = create_sshfp(hostname, keytype, key) return record return "" @@ -168,7 +168,7 @@ if "," in host: host = host.split(",")[0] if all_hosts or host in hostnames or host == hostnames: - if not check_keytype(keytype): + if not check_keytype(keytype, host): continue all_records.append(create_sshfp(host, keytype, key)) if all_records: -------------------- Could you please apply it to the sshfp package? Thanks, Ward. -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages sshfp depends on: ii openssh-client 1:5.9p1-5 ii python 2.7.2-10 ii python-dnspython 1.10.0-1 ii python-ipcalc 0.3-1 ii python-ldns 1.6.13-1 ii python2.7 [python-argparse] 2.7.3~rc2-2.1 sshfp recommends no packages. sshfp suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org