diff options
Diffstat (limited to 'debian/openssh-server.postinst')
-rw-r--r-- | debian/openssh-server.postinst | 12 |
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 |
2 | set -e | 2 | set -e |
3 | 3 | ||
4 | . /usr/share/debconf/confmodule | ||
5 | db_version 2.0 | ||
6 | |||
4 | action="$1" | 7 | action="$1" |
5 | oldversion="$2" | 8 | oldversion="$2" |
6 | 9 | ||
@@ -193,7 +196,7 @@ LogLevel INFO | |||
193 | 196 | ||
194 | # Authentication: | 197 | # Authentication: |
195 | LoginGraceTime 120 | 198 | LoginGraceTime 120 |
196 | PermitRootLogin yes | 199 | PermitRootLogin without-password |
197 | StrictModes yes | 200 | StrictModes yes |
198 | 201 | ||
199 | RSAAuthentication yes | 202 | RSAAuthentication 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 | ||
308 | fi | 316 | fi |
309 | 317 | ||
310 | #DEBHELPER# | 318 | #DEBHELPER# |
311 | 319 | ||
320 | db_stop | ||
321 | |||
312 | exit 0 | 322 | exit 0 |