summaryrefslogtreecommitdiff
path: root/debian/openssh-server.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/openssh-server.postinst')
-rw-r--r--debian/openssh-server.postinst12
1 files changed, 11 insertions, 1 deletions
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst
index 0189f5fbb..daa0f6796 100644
--- a/debian/openssh-server.postinst
+++ b/debian/openssh-server.postinst
@@ -1,6 +1,9 @@
1#!/bin/sh 1#!/bin/sh
2set -e 2set -e
3 3
4. /usr/share/debconf/confmodule
5db_version 2.0
6
4action="$1" 7action="$1"
5oldversion="$2" 8oldversion="$2"
6 9
@@ -193,7 +196,7 @@ LogLevel INFO
193 196
194# Authentication: 197# Authentication:
195LoginGraceTime 120 198LoginGraceTime 120
196PermitRootLogin yes 199PermitRootLogin without-password
197StrictModes yes 200StrictModes yes
198 201
199RSAAuthentication yes 202RSAAuthentication yes
@@ -305,8 +308,15 @@ if [ "$action" = configure ]; then
305 # restart it under systemd. 308 # restart it under systemd.
306 start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd || true 309 start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd || true
307 fi 310 fi
311 if dpkg --compare-versions "$2" lt-nl 1:6.6p1-1 && \
312 [ "$(get_config_option PermitRootLogin)" = yes ] &&
313 db_get openssh-server/permit-root-login && [ "$RET" = true ]; then
314 set_config_option PermitRootLogin without-password
315 fi
308fi 316fi
309 317
310#DEBHELPER# 318#DEBHELPER#
311 319
320db_stop
321
312exit 0 322exit 0