[Fusionforge-commits] r14305 - in branches/Branch_5_1: . src/deb-specific src/debian

Roland Mas lolando at fusionforge.org
Mon Sep 5 11:08:11 CEST 2011


Author: lolando
Date: 2011-09-05 11:08:11 +0200 (Mon, 05 Sep 2011)
New Revision: 14305

Modified:
   branches/Branch_5_1/
   branches/Branch_5_1/src/deb-specific/install-postfix.sh
   branches/Branch_5_1/src/debian/changelog
Log:
Fixed possible infinite loop in install-postfix.sh, thanks to Vincent Caron

Modified: branches/Branch_5_1/src/deb-specific/install-postfix.sh
===================================================================
--- branches/Branch_5_1/src/deb-specific/install-postfix.sh	2011-09-05 08:44:41 UTC (rev 14304)
+++ branches/Branch_5_1/src/deb-specific/install-postfix.sh	2011-09-05 09:08:11 UTC (rev 14305)
@@ -43,7 +43,10 @@
 	perl -e '
 require ("/etc/gforge/local.pl") ;
 my $l;
-while (($l = <>) !~ /^\s*mydestination/) { print $l; };
+while ($l = <>) { 
+  last if l =~ /^\s*mydestination/) ;
+  print $l;
+};
 chomp $l;
 $l .= ", users.$domain_name" unless ($l =~ /^[^#]*users.$domain_name/);
 print "$l\n";
@@ -165,17 +168,19 @@
 	# First, replace the list of local domains
 	perl -e '
 require ("/etc/gforge/local.pl") ;
-while (($l = <>) !~ /^\s*mydestination/) {
+while ($l = <>) { 
+  last if l =~ /^\s*mydestination/) ;
   print $l;
 };
 chomp $l ;
-$l =~ /^(\s*mydestination\s*=\s*)(\S.*)/ ;
-$head = $1 ;
-$dests = $2 ;
-$dests =~ s/, users.$domain_name// ;
-$dests =~ s/, $sys_lists_host// ;
-$l = $head . $dests ;
-print "$l\n" ;
+if ($l =~ /^(\s*mydestination\s*=\s*)(\S.*)/) {
+  $head = $1 ;
+  $dests = $2 ;
+  $dests =~ s/, users.$domain_name// ;
+  $dests =~ s/, $sys_lists_host// ;
+  $l = $head . $dests ;
+  print "$l\n" ;
+}
 while ($l = <>) { print $l; };
 ' < /etc/postfix/main.cf.gforge-new > $tmp1
 	grep -q '^[[:space:]]*relay_domains' $tmp1 && perl -i -e '

Modified: branches/Branch_5_1/src/debian/changelog
===================================================================
--- branches/Branch_5_1/src/debian/changelog	2011-09-05 08:44:41 UTC (rev 14304)
+++ branches/Branch_5_1/src/debian/changelog	2011-09-05 09:08:11 UTC (rev 14305)
@@ -1,9 +1,14 @@
 fusionforge (5.1-5+) UNRELEASED; urgency=low
 
+  [ Olivier Berger ]
   * Fix invalid XHTML+RDFa (Closes: #635373).
 
- -- Olivier Berger <obergix at debian.org>  Mon, 29 Aug 2011 19:25:56 +0200
+  [ Roland Mas ]
+  * Fixed possible infinite loop in install-postfix.sh, thanks to Vincent
+    Caron (closes: #639947).
 
+ -- Roland Mas <lolando at debian.org>  Mon, 05 Sep 2011 11:07:11 +0200
+
 fusionforge (5.1-5) unstable; urgency=low
 
   [ Olivier Berger ]




More information about the Fusionforge-commits mailing list