[Pkg-shadow-commits] r1773 - debian/trunk/tests/common
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Mon Feb 11 19:44:03 UTC 2008
Author: nekral-guest
Date: 2008-02-11 19:44:02 +0000 (Mon, 11 Feb 2008)
New Revision: 1773
Modified:
debian/trunk/tests/common/compare_file.pl
Log:
Accept password file with multiple password specified as @PASS_DES ...@
Modified: debian/trunk/tests/common/compare_file.pl
===================================================================
--- debian/trunk/tests/common/compare_file.pl 2008-02-10 21:35:17 UTC (rev 1772)
+++ debian/trunk/tests/common/compare_file.pl 2008-02-11 19:44:02 UTC (rev 1773)
@@ -8,9 +8,12 @@
my $today = int(time()/(24*3600));
$template =~ s/\@TODAY\@/$today/g;
-if ($template =~ m/(.*):\@PASS_DES (.*)\@:/m) {
- my $user = $1;
- my $pass = $2;
+my $tmp = $template;
+while ($tmp =~ m/^(.*?)([^\n]*):\@PASS_DES ([^:]*)\@:(.*)$/s) {
+ my $user = $2;
+ my $pass = $3;
+ $tmp = $4;
+ if ($file =~ m/^$user:/m) {
$file =~ s/^$user:([^:]*):(.*)$/$user:\@PASS_DES $pass\@:$2/m;
my $cryptpass = $1;
# Check the password
More information about the Pkg-shadow-commits
mailing list