summaryrefslogtreecommitdiff
path: root/debian/openssh-server.config
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2004-10-06 13:22:30 +0000
committerColin Watson <cjwatson@debian.org>2004-10-06 13:22:30 +0000
commit23ad7ca187d4b40b45b18903c6e96b4cc3ea9ec1 (patch)
treeb30b75b82f92948e8721ca68cb874178f72ed67c /debian/openssh-server.config
parent77be91fc874d0bdfb00e2da57550ff9c8969a6d4 (diff)
Forward-port from HEAD:
* If PasswordAuthentication is disabled, then offer to disable ChallengeResponseAuthentication too. The current PAM code will attempt password-style authentication if ChallengeResponseAuthentication is enabled (closes: #250369). * This will ask a question of anyone who installed fresh with 1:3.8p1-2 or later and then upgraded. Sorry about that ... for this reason, the default answer is to leave ChallengeResponseAuthentication enabled.
Diffstat (limited to 'debian/openssh-server.config')
-rw-r--r--debian/openssh-server.config25
1 files changed, 25 insertions, 0 deletions
diff --git a/debian/openssh-server.config b/debian/openssh-server.config
index b40e8afd7..0cd0a4b8d 100644
--- a/debian/openssh-server.config
+++ b/debian/openssh-server.config
@@ -7,6 +7,18 @@ version=$2
7. /usr/share/debconf/confmodule 7. /usr/share/debconf/confmodule
8db_version 2.0 8db_version 2.0
9 9
10
11get_config_option() {
12 option="$1"
13
14 [ -f /etc/ssh/sshd_config ] || return
15
16 # TODO: actually only one '=' allowed after option
17 perl -ne 'print if s/^[[:space:]]*'"$option"'[[:space:]=]+//i' \
18 /etc/ssh/sshd_config 2>/dev/null
19}
20
21
10if [ -e /etc/init.d/ssh ] && ! grep -q pidfile /etc/init.d/ssh 22if [ -e /etc/init.d/ssh ] && ! grep -q pidfile /etc/init.d/ssh
11then 23then
12 db_fset ssh/use_old_init_script seen false 24 db_fset ssh/use_old_init_script seen false
@@ -35,6 +47,19 @@ then
35 then db_input medium ssh/protocol2_only ||true 47 then db_input medium ssh/protocol2_only ||true
36 fi 48 fi
37 fi 49 fi
50
51 # An empty version means we're upgrading from before the package split,
52 # so check.
53 if dpkg --compare-versions "$version" lt 1:3.8.1p1-11
54 then
55 passwordauth="$(get_config_option PasswordAuthentication)"
56 crauth="$(get_config_option ChallengeResponseAuthentication)"
57 if [ "$passwordauth" = no ] && \
58 ([ -z "$crauth" ] || [ "$crauth" = yes ])
59 then
60 db_input critical ssh/disable_cr_auth || true
61 fi
62 fi
38fi 63fi
39 64
40if [ -x /usr/sbin/in.telnetd ] && grep -q "^telnet\b" /etc/inetd.conf 65if [ -x /usr/sbin/in.telnetd ] && grep -q "^telnet\b" /etc/inetd.conf