diff options
author | Colin Watson <cjwatson@debian.org> | 2005-07-09 23:06:59 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2005-07-09 23:06:59 +0000 |
commit | 8e5cf830fdb7e1b39c9666fd5df379c2d127669d (patch) | |
tree | ae998c779b6ccf001a34d8e0e9aea88854341af8 | |
parent | 316983acd1f20d11c03937f17667b83f6c1bba98 (diff) |
Do the IDEA host key check on a temporary file to avoid altering
/etc/ssh/ssh_host_key itself (closes: #312312).
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/openssh-server.postinst | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 00e514beb..61bbb4234 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -1,3 +1,10 @@ | |||
1 | openssh (1:4.1p1-7) UNRELEASED; urgency=low | ||
2 | |||
3 | * Do the IDEA host key check on a temporary file to avoid altering | ||
4 | /etc/ssh/ssh_host_key itself (closes: #312312). | ||
5 | |||
6 | -- Colin Watson <cjwatson@debian.org> Sat, 9 Jul 2005 23:59:38 +0100 | ||
7 | |||
1 | openssh (1:4.1p1-6) unstable; urgency=low | 8 | openssh (1:4.1p1-6) unstable; urgency=low |
2 | 9 | ||
3 | * Fix one-character typo that meant the binaries in openssh-client and | 10 | * Fix one-character typo that meant the binaries in openssh-client and |
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst index 02d01f2d8..ef1412ca7 100644 --- a/debian/openssh-server.postinst +++ b/debian/openssh-server.postinst | |||
@@ -26,11 +26,13 @@ check_idea_key() { | |||
26 | # check for old host_key files using IDEA, which openssh does not | 26 | # check for old host_key files using IDEA, which openssh does not |
27 | # support | 27 | # support |
28 | if [ -f /etc/ssh/ssh_host_key ] ; then | 28 | if [ -f /etc/ssh/ssh_host_key ] ; then |
29 | if ssh-keygen -p -N '' -f /etc/ssh/ssh_host_key 2>&1 | \ | 29 | cp -a /etc/ssh/ssh_host_key /etc/ssh/ssh_host_key.check_idea |
30 | if ssh-keygen -p -N '' -f /etc/ssh/ssh_host_key.check_idea 2>&1 | \ | ||
30 | grep -q 'unknown cipher' 2>/dev/null; then | 31 | grep -q 'unknown cipher' 2>/dev/null; then |
31 | mv /etc/ssh/ssh_host_key /etc/ssh/ssh_host_key.old | 32 | mv /etc/ssh/ssh_host_key /etc/ssh/ssh_host_key.old |
32 | mv /etc/ssh/ssh_host_key.pub /etc/ssh/ssh_host_key.pub.old | 33 | mv /etc/ssh/ssh_host_key.pub /etc/ssh/ssh_host_key.pub.old |
33 | fi | 34 | fi |
35 | rm -f /etc/ssh/ssh_host_key.check_idea | ||
34 | fi | 36 | fi |
35 | } | 37 | } |
36 | 38 | ||