Attached.
diff -u clamav-0.97.5+dfsg/debian/changelog clamav-0.97.5+dfsg/debian/changelog
--- clamav-0.97.5+dfsg/debian/changelog
+++ clamav-0.97.5+dfsg/debian/changelog
@@ -1,3 +1,11 @@
+clamav (0.97.5+dfsg-3) unstable; urgency=low
+
+  * Fix proxy port configuration handling in clamav-freshclam.postinst so that
+    failure to specify port does not result in an invalid configuration
+    (Closes: #678247), (LP: #784797)
+
+ -- Scott Kitterman <sc...@kitterman.com>  Sat, 30 Jun 2012 21:35:33 -0400
+
 clamav (0.97.5+dfsg-2) unstable; urgency=medium
 
   * Medium urgency due to security fixes
diff -u clamav-0.97.5+dfsg/debian/clamav-freshclam.postinst.in clamav-0.97.5+dfsg/debian/clamav-freshclam.postinst.in
--- clamav-0.97.5+dfsg/debian/clamav-freshclam.postinst.in
+++ clamav-0.97.5+dfsg/debian/clamav-freshclam.postinst.in
@@ -81,6 +81,9 @@
     url="`echo "$RET" | sed -e 's,^http://,,g' | sed -e 's,/$,,g'`"
     phost="`echo "$url" | cut -d':' -f 1`"
     pport="`echo "$url" | cut -d':' -f 2`"
+    if [ "$pport" = "$phost" ]; then
+        pport=""
+    fi
     fullurl="$RET"
     db_metaget clamav-freshclam/proxy_user value || true
     if [ "$RET" != "" ]; then
@@ -239,10 +242,12 @@
     grep -q "$m" "$DEBCONFILE" || echo "DatabaseMirror $m" >> $DEBCONFILE
   done
 
-  if [ -n "$phost" ] && [ -n "$pport" ]; then
+  if [ -n "$phost" ]; then
     echo "# Proxy: $fullurl" >> $DEBCONFILE
     echo "HTTPProxyServer $phost" >> $DEBCONFILE
-    echo "HTTPProxyPort $pport" >> $DEBCONFILE
+    if [ -n "$pport" ]; then
+      echo "HTTPProxyPort $pport" >> $DEBCONFILE
+    fi
   fi
   if [ -n "$puser" ] && [ -n "$ppass" ]; then
     echo "# Proxy authentication: $fulluser" >> $DEBCONFILE

Reply via email to