diff options
author | Colin Watson <cjwatson@debian.org> | 2013-05-21 23:59:16 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2013-05-21 23:59:16 +0100 |
commit | 231868ac0c5d34eeed70c84ff96069ef691203e5 (patch) | |
tree | 903aecf391255cbc3aaa05ba76625e1c80d7ad85 /debian/openssh-server.preinst | |
parent | 22307bfaab741af870b040c5704233a08f26a013 (diff) |
Remove support for upgrading from ssh-nonfree.
Diffstat (limited to 'debian/openssh-server.preinst')
-rw-r--r-- | debian/openssh-server.preinst | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/debian/openssh-server.preinst b/debian/openssh-server.preinst index 83fd22e59..8bb2d6f1a 100644 --- a/debian/openssh-server.preinst +++ b/debian/openssh-server.preinst | |||
@@ -16,36 +16,8 @@ prepare_mv_conffile () { | |||
16 | fi | 16 | fi |
17 | } | 17 | } |
18 | 18 | ||
19 | if [ -d /etc/ssh-nonfree ] && [ ! -d /etc/ssh ]; then | ||
20 | version=1.2.27 | ||
21 | fi | ||
22 | |||
23 | if [ "$action" = upgrade ] || [ "$action" = install ] | 19 | if [ "$action" = upgrade ] || [ "$action" = install ] |
24 | then | 20 | then |
25 | # deal with upgrading from pre-OpenSSH versions | ||
26 | key=/etc/ssh/ssh_host_key | ||
27 | export key | ||
28 | if [ -n "$version" ] && [ -x /usr/bin/ssh-keygen ] && [ -f $key ] && | ||
29 | dpkg --compare-versions "$version" lt 1.2.28 | ||
30 | then | ||
31 | # make sure that keys get updated to get rid of IDEA | ||
32 | # | ||
33 | # N.B. this only works because we've still got the old | ||
34 | # nonfree ssh-keygen at this point | ||
35 | # | ||
36 | # First, check if we need to bother | ||
37 | printf '\0\0' | 3<&0 sh -c \ | ||
38 | 'dd if=$key bs=1 skip=32 count=2 2>/dev/null | cmp -s - /dev/fd/3' || { | ||
39 | # this means that bytes 32&33 of the key were not both zero, in which | ||
40 | # case the key is encrypted, which we need to fix | ||
41 | chmod 600 $key | ||
42 | ssh-keygen -u -f $key >/dev/null | ||
43 | if which restorecon >/dev/null 2>&1; then | ||
44 | restorecon "$key.pub" | ||
45 | fi | ||
46 | } | ||
47 | fi | ||
48 | |||
49 | if dpkg --compare-versions "$version" lt 1:4.7p1-4; then | 21 | if dpkg --compare-versions "$version" lt 1:4.7p1-4; then |
50 | prepare_mv_conffile /etc/pam.d/ssh | 22 | prepare_mv_conffile /etc/pam.d/ssh |
51 | fi | 23 | fi |