[Pkg-shadow-commits] r1774 - debian/trunk/tests/common

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Mon Feb 11 19:46:33 UTC 2008


Author: nekral-guest
Date: 2008-02-11 19:46:33 +0000 (Mon, 11 Feb 2008)
New Revision: 1774

Modified:
   debian/trunk/tests/common/compare_file.pl
Log:
Accept password file with multiple password specified as @PASS_MD5 ...@


Modified: debian/trunk/tests/common/compare_file.pl
===================================================================
--- debian/trunk/tests/common/compare_file.pl	2008-02-11 19:44:02 UTC (rev 1773)
+++ debian/trunk/tests/common/compare_file.pl	2008-02-11 19:46:33 UTC (rev 1774)
@@ -24,9 +24,12 @@
 		if ($checkpass ne $cryptpass);
 }
 
-if ($template =~ m/(.*):\@PASS_MD5 (.*)\@:/m) {
-	my $user = $1;
-	my $pass = $2;
+$tmp = $template;
+while ($tmp =~ m/^(.*?)([^\n]*):\@PASS_MD5 (.*)\@:(.*)$/s) {
+	my $user = $2;
+	my $pass = $3;
+	$tmp = $4;
+	if ($file =~ m/^$user:/m) {
 	$file =~ s/^$user:([^:]*):(.*)$/$user:\@PASS_MD5 $pass\@:$2/m;
 	my $cryptpass = $1;
 	# Check the password




More information about the Pkg-shadow-commits mailing list