diff options
author | Colin Watson <cjwatson@debian.org> | 2003-09-01 00:51:03 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2003-09-01 00:51:03 +0000 |
commit | 79cf0b3654d7b597de323153eb57015cdfbd90a4 (patch) | |
tree | 274e78bc3369e218e59aa1fcc9b7e90697f424f1 /debian/config | |
parent | d984a3c6658e950881edcfb2aae464add93f68d4 (diff) |
Debian release 3.4p1-1.
Diffstat (limited to 'debian/config')
-rw-r--r-- | debian/config | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/debian/config b/debian/config new file mode 100644 index 000000000..0a5f42b2e --- /dev/null +++ b/debian/config | |||
@@ -0,0 +1,86 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | action=$1 | ||
4 | version=$2 | ||
5 | |||
6 | if [ -d /etc/ssh-nonfree -a ! -d /etc/ssh ]; then | ||
7 | version=1.2.27 | ||
8 | cp -a /etc/ssh-nonfree /etc/ssh | ||
9 | fi | ||
10 | |||
11 | # Source debconf library. | ||
12 | . /usr/share/debconf/confmodule | ||
13 | db_version 2.0 | ||
14 | |||
15 | if [ -n "$version" ] && dpkg --compare-versions "$version" lt 1:3.0p1-1 | ||
16 | then | ||
17 | db_text medium ssh/ssh2_keys_merged | ||
18 | fi | ||
19 | |||
20 | if [ -e /etc/init.d/ssh ] && ! grep -q pidfile /etc/init.d/ssh | ||
21 | then | ||
22 | db_fset ssh/use_old_init_script isdefault true | ||
23 | db_input medium ssh/use_old_init_script || true | ||
24 | db_go | ||
25 | |||
26 | db_get ssh/use_old_init_script | ||
27 | [ "$RET" = "false" ] && exit 0 | ||
28 | else | ||
29 | db_set ssh/use_old_init_script true | ||
30 | db_fset ssh/use_old_init_script isdefault false | ||
31 | fi | ||
32 | |||
33 | if [ -z "$version" -a ! -e /etc/ssh/sshd_config ] | ||
34 | then | ||
35 | db_input medium ssh/protocol2_only || true | ||
36 | fi | ||
37 | |||
38 | if [ -e /etc/ssh/sshd_config ] | ||
39 | then | ||
40 | if dpkg --compare-versions "$version" lt-nl 1:1.3 ; | ||
41 | then db_input medium ssh/new_config || true | ||
42 | db_get ssh/new_config | ||
43 | if [ "$RET" = "true" ]; | ||
44 | then db_input medium ssh/protocol2_only ||true | ||
45 | db_input high ssh/privsep_ask ||true | ||
46 | else db_text high ssh/privsep_tell ||true | ||
47 | fi | ||
48 | else db_text high ssh/privsep_tell ||true | ||
49 | fi | ||
50 | else db_text high ssh/privsep_tell ||true | ||
51 | fi | ||
52 | |||
53 | db_input medium ssh/SUID_client || true | ||
54 | |||
55 | db_input medium ssh/run_sshd || true | ||
56 | |||
57 | if [ -x /usr/sbin/in.telnetd ] && grep -q "^telnet\b" /etc/inetd.conf | ||
58 | then | ||
59 | if ! /usr/sbin/in.telnetd -? 2>&1 | grep -q ssl 2>/dev/null | ||
60 | then | ||
61 | db_input low ssh/insecure_telnetd || true | ||
62 | fi | ||
63 | fi | ||
64 | |||
65 | key=/etc/ssh/ssh_host_key | ||
66 | export key | ||
67 | if [ -n "$version" ] && [ -f $key ] && [ ! -x /usr/bin/ssh-keygen ] && | ||
68 | dpkg --compare-versions "$version" lt 1.2.28 | ||
69 | then | ||
70 | # make sure that keys get updated to get rid of IDEA; preinst | ||
71 | # actually does the work, but if the old ssh-keygen is not found, | ||
72 | # it can't do that -- thus, we tell the user that he must create | ||
73 | # a new host key. | ||
74 | echo -en '\0\0' | 3<&0 sh -c \ | ||
75 | 'dd if=$key bs=1 skip=32 count=2 2>/dev/null | cmp -s - /dev/fd/3' || { | ||
76 | # this means that bytes 32&33 of the key were not both zero, in which | ||
77 | # case the key is encrypted, which we need to fix | ||
78 | db_input high ssh/encrypted_host_key_but_no_keygen || true | ||
79 | } | ||
80 | fi | ||
81 | |||
82 | |||
83 | db_text low ssh/forward_warning || true | ||
84 | db_go | ||
85 | |||
86 | exit 0 | ||