summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog2
-rw-r--r--debian/openssh-server.postinst32
2 files changed, 34 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index c46405b33..139e9604a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
1openssh (1:4.7p1-8) UNRELEASED; urgency=low 1openssh (1:4.7p1-8) UNRELEASED; urgency=low
2 2
3 * Fill in CVE identifier for security vulnerability fixed in 1:4.7p1-5. 3 * Fill in CVE identifier for security vulnerability fixed in 1:4.7p1-5.
4 * Rename KeepAlive to TCPKeepAlive in sshd_config, cleaning up from old
5 configurations (LP: #211400).
4 6
5 -- Colin Watson <cjwatson@debian.org> Tue, 01 Apr 2008 14:12:43 +0100 7 -- Colin Watson <cjwatson@debian.org> Tue, 01 Apr 2008 14:12:43 +0100
6 8
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst
index ed7590c87..1d26a7b55 100644
--- a/debian/openssh-server.postinst
+++ b/debian/openssh-server.postinst
@@ -97,6 +97,32 @@ disable_config_option() {
97} 97}
98 98
99 99
100rename_config_option() {
101 oldoption="$1"
102 newoption="$2"
103
104 value="$(get_config_option "$oldoption")"
105 [ "$value" ] || return 0
106
107 perl -le '
108 $oldoption = $ARGV[0]; $newoption = $ARGV[1];
109 while (<STDIN>) {
110 chomp;
111 (my $match = $_) =~ s/\s+/ /g;
112 # TODO: actually only one "=" allowed after option
113 if ($match =~ s/^(\s*)\Q$oldoption\E([[:space:]=]+)/$1$newoption$2/i) {
114 $_ = $match;
115 }
116 print;
117 }' \
118 "$oldoption" "$newoption" \
119 < /etc/ssh/sshd_config > /etc/ssh/sshd_config.dpkg-new
120 chown --reference /etc/ssh/sshd_config /etc/ssh/sshd_config.dpkg-new
121 chmod --reference /etc/ssh/sshd_config /etc/ssh/sshd_config.dpkg-new
122 mv /etc/ssh/sshd_config.dpkg-new /etc/ssh/sshd_config
123}
124
125
100remove_obsolete_gssapi() { 126remove_obsolete_gssapi() {
101 disable_config_option GSSAPINoMICAuthentication 127 disable_config_option GSSAPINoMICAuthentication
102 disable_config_option GSSUseSessionCCache 128 disable_config_option GSSUseSessionCCache
@@ -227,6 +253,12 @@ create_sshdconfig() {
227 remove_obsolete_gssapi 253 remove_obsolete_gssapi
228 fi 254 fi
229 255
256 # This option was renamed in 3.8p1, but we never took care
257 # of adjusting the configuration file until now.
258 if dpkg --compare-versions "$oldversion" lt 1:4.7p1-8; then
259 rename_config_option KeepAlive TCPKeepAlive
260 fi
261
230 return 0 262 return 0
231 fi 263 fi
232 fi 264 fi