Package: python-twisted-conch
Version: 2.0.1-5
Followup-For: Bug #344425

the problem for the crash was the open mode (has to be 'r+' and not 'a')
of the known_hosts file
it is fixed in the latest svn version. patch attached.
nevertheless conch (twisted) can not write hashed hostnames to the
know_hosts file

Regards
Lars

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-k7-cz
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)

Versions of packages python-twisted-conch depends on:
ii  python                     2.3.5-3       An interactive high-level
object-o
ii  python-crypto              2.0.1+dfsg1-1 cryptographic algorithms
and proto
ii  python2.3-twisted-conch    2.0.1-5       The Twisted SSH
Implementation (fo

python-twisted-conch recommends no packages.

-- no debconf information
--- /usr/lib/python2.3/site-packages/twisted/conch/client/default.py	2005-12-23 14:54:24.082617500 +0100
+++ /tmp/Twisted/twisted/conch/client/default.py	2005-12-23 14:35:18.687034750 +0100
@@ -43,7 +43,7 @@
             print 'Host key verification failed.'
             return defer.fail(ConchError('bad host key'))
         print "Warning: Permanently added '%s' (%s) to the list of known hosts." % (khHost, {'ssh-dss':'DSA', 'ssh-rsa':'RSA'}[keyType])
-        known_hosts = open(os.path.expanduser('~/.ssh/known_hosts'), 'a')
+        known_hosts = open(os.path.expanduser('~/.ssh/known_hosts'), 'r+')
         known_hosts.seek(-1, 2)
         if known_hosts.read(1) != '\n':
             known_hosts.write('\n')

Reply via email to