summaryrefslogtreecommitdiff
path: root/debian/ssh-krb5.postinst
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2017-10-16 10:32:24 +0100
committerColin Watson <cjwatson@debian.org>2017-10-16 10:32:24 +0100
commitcbb2c36ba712f5f8cba3214a105cbaa4471b15e5 (patch)
tree5cd399721cf37dea59d6681265aa85f3d7549b66 /debian/ssh-krb5.postinst
parent1deecb1b97e0d7563ad1117c1d27573f6692cbce (diff)
Remove the decade-old ssh-krb5 transitional package; upgrades of openssh-server will preserve existing configuration, and new installations should just enable GSSAPIAuthentication and GSSAPIKeyExchange in sshd_config (closes: #878626).
Diffstat (limited to 'debian/ssh-krb5.postinst')
-rw-r--r--debian/ssh-krb5.postinst61
1 files changed, 0 insertions, 61 deletions
diff --git a/debian/ssh-krb5.postinst b/debian/ssh-krb5.postinst
deleted file mode 100644
index f799accfe..000000000
--- a/debian/ssh-krb5.postinst
+++ /dev/null
@@ -1,61 +0,0 @@
1#!/bin/sh
2
3set -e
4
5action="$1"
6oldversion="$2"
7
8if [ "$action" = configure ] ; then
9 # Make sure that GSSAPI is enabled. If there is no uncommented GSSAPI
10 # configuration, uncomment any commented-out configuration if present
11 # (this will catch the case of a fresh install of openssh-server).
12 # Otherwise, add configuration turning on GSSAPIAuthentication and
13 # GSSAPIKeyExchange.
14 #
15 # If there is some configuration, we may be upgrading from ssh-krb5. It
16 # enabled GSSAPIKeyExchange without any configuration option. Therefore,
17 # if it isn't explicitly set, always enable it for compatible behavior
18 # with ssh-krb5.
19 if dpkg --compare-versions "$oldversion" ge 1:4.3p2-9; then
20 :
21 else
22 changed=
23 if grep -qi '^[ ]*GSSAPI' /etc/ssh/sshd_config ; then
24 if grep -qi '^[ ]*GSSAPIKeyExchange' /etc/ssh/sshd_config ; then
25 :
26 else
27 changed=true
28 cat >> /etc/ssh/sshd_config <<EOF
29
30# GSSAPI key exchange (added by ssh-krb5 transitional package)
31GSSAPIKeyExchange yes
32EOF
33 fi
34 else
35 changed=true
36 if grep -qi '^#GSSAPI' /etc/ssh/sshd_config ; then
37 perl -pe 's/^\#(GSSAPI(Authentication|KeyExchange))\b.*/$1 yes/i' \
38 < /etc/ssh/sshd_config > /etc/ssh/sshd_config.dpkg-new
39 chown --reference /etc/ssh/sshd_config \
40 /etc/ssh/sshd_config.dpkg-new
41 chmod --reference /etc/ssh/sshd_config \
42 /etc/ssh/sshd_config.dpkg-new
43 mv /etc/ssh/sshd_config.dpkg-new /etc/ssh/sshd_config
44 else
45 cat >> /etc/ssh/sshd_config <<EOF
46
47# GSSAPI authentication (added by ssh-krb5 transitional package)
48GSSAPIAuthentication yes
49GSSAPIKeyExchange yes
50EOF
51 fi
52 fi
53 if [ -n "$changed" ]; then
54 invoke-rc.d ssh restart
55 fi
56 fi
57fi
58
59#DEBHELPER#
60
61exit 0