Package: spong-common
Version: 2.7.7-8
Severity: serious
Tags: patch

If the spong.conf setting of SPONGSERVER has spaces around the
equals sign (which perl allows), the debconf database is not
correctly seeded prior to a configuration, and overwrites the user
setting.

Please consider the following two patches against postinst and
config. I am using sed instead of perl for brevity.

--- /var/lib/dpkg/info/spong-common.postinst.orig 2005-08-23 22:54:12.142434228 
+0200
+++ /var/lib/dpkg/info/spong-common.postinst  2005-08-23 22:56:11.892803848 
+0200
@@ -27,7 +27,7 @@
 
  else
 
-  perl -i -p -e "s/^\\\$SPONGSERVER.*$/\\\$SPONGSERVER=\"$RET\";/" 
$spong_localcfg
+  sed -i -e "s/\(^$SPONGSERVER *= *\)\".*\".*$/\1\"$RET\"/" $spong_localcfg
   
 
 fi

--- /var/lib/dpkg/info/spong-common.config.orig 2005-08-23 22:50:02.764943752 
+0200
+++ /var/lib/dpkg/info/spong-common.config  2005-08-23 22:51:26.748635586 +0200
@@ -9,7 +9,7 @@
 
 if [ -e $spong_localcfg ]; then
 
-  sserver=`sed -ne 's/^$SPONGSERVER=\"\(.*\)\"\;/\1/p' < $spong_localcfg`
+  sserver=`sed -ne 's/^$SPONGSERVER *= *\"\(.*\)\"\;/\1/p' < $spong_localcfg`
 
   if [ "$sserver" ]; then

-- System Information:
Debian Release: 3.1
  APT prefers stable
  APT policy: (700, 'stable'), (600, 'testing'), (98, 'unstable'), (1, 
'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-cirrus
Locale: LANG=en_GB, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

-- 
 .''`.     martin f. krafft <[EMAIL PROTECTED]>
: :'  :    proud Debian developer and author: http://debiansystem.info
`. `'`
  `-  Debian - when you have better things to do than fixing a system
 
Invalid/expired PGP (sub)keys? Use subkeys.pgp.net as keyserver!
 
"no work of art ever puts forward views.
 views belong to people
 who are not artists."
                                                        -- oscar wilde

Attachment: signature.asc
Description: Digital signature (GPG/PGP)

Reply via email to