Bug#197037: ssh: Patch to postinst and prerm files
Package: ssh
Version: 1:3.8.1p1-8.sarge.4
Followup-For: Bug #197037
I'm attaching a patch to Sarge's ssh which should fix this bug.
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)
Versions of packages ssh depends on:
ii adduser 3.63 Add and remove users and groups
ii debconf 1.4.30.13 Debian configuration management sy
ii dpkg 1.10.28 Package maintenance system for Deb
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii libpam-modules 0.76-22 Pluggable Authentication Modules f
ii libpam-runtime 0.76-22 Runtime support for the PAM librar
ii libpam0g 0.76-22 Pluggable Authentication Modules l
ii libssl0.9.7 0.9.7e-3 SSL shared libraries
ii libwrap0 7.6.dbs-8 Wietse Venema's TCP wrappers libra
ii zlib1g 1:1.2.2-4.sarge.2 compression library - runtime
-- debconf information:
ssh/insecure_rshd:
ssh/ssh2_keys_merged:
ssh/user_environment_tell:
* ssh/forward_warning:
ssh/insecure_telnetd:
ssh/new_config: true
* ssh/use_old_init_script: true
* ssh/protocol2_only: true
ssh/encrypted_host_key_but_no_keygen:
* ssh/run_sshd: true
* ssh/SUID_client: true
ssh/disable_cr_auth: false
diff -ru ssh_orig/ssh.postinst ssh_fixed/ssh.postinst
--- ssh_orig/ssh.postinst 2005-07-27 19:33:11.000000000 +0100
+++ ssh_fixed/ssh.postinst 2005-07-27 22:32:11.047914197 +0100
@@ -285,21 +285,11 @@
}
-create_alternatives() {
-# Create alternatives for the various r* tools.
-# Make sure we don't change existing alternatives that a user might have
-# changed, but clean up after some old alternatives that mistakenly pointed
-# rlogin and rcp to ssh.
+cleanup_alternatives () {
+# Clean up after some old alternatives that mistakenly pointed rlogin and rcp
+# to ssh.
update-alternatives --quiet --remove rlogin /usr/bin/ssh
update-alternatives --quiet --remove rcp /usr/bin/ssh
- for cmd in rsh rlogin rcp; do
- scmd="s${cmd#r}"
- if ! update-alternatives --display "$cmd" | \
- grep -q "$scmd"; then
- update-alternatives --quiet --install "/usr/bin/$cmd" "$cmd" "/usr/bin/$scmd" 20 \
- --slave "/usr/share/man/man1/$cmd.1.gz" "$cmd.1.gz" "/usr/share/man/man1/$scmd.1.gz"
- fi
- done
}
setup_sshd_user() {
@@ -387,7 +377,7 @@
create_keys
fix_rsh_diversion
fix_statoverride
-create_alternatives
+cleanup_alternatives
setup_sshd_user
set_sshd_permissions
if [ "$2" = "1:3.5p1-1" ]; then
diff -ru ssh_orig/ssh.prerm ssh_fixed/ssh.prerm
--- ssh_orig/ssh.prerm 2005-07-27 19:33:11.000000000 +0100
+++ ssh_fixed/ssh.prerm 2005-07-27 22:32:11.047914197 +0100
@@ -17,9 +17,6 @@
case "$1" in
remove|deconfigure)
- update-alternatives --quiet --remove rsh /usr/bin/ssh
- update-alternatives --quiet --remove rlogin /usr/bin/slogin
- update-alternatives --quiet --remove rcp /usr/bin/scp
if [ -x /etc/init.d/ssh ]; then
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d ssh stop
Reply to: