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

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Sat Aug 28 18:05:17 UTC 2010


Author: nekral-guest
Date: 2010-08-28 18:05:03 +0000 (Sat, 28 Aug 2010)
New Revision: 3265

Modified:
   debian/trunk/tests/common/compare_file.pl
Log:
Avoid spurious warning messages.
Only display the messages from stderr if the passwords do not match.


Modified: debian/trunk/tests/common/compare_file.pl
===================================================================
--- debian/trunk/tests/common/compare_file.pl	2010-08-28 18:03:43 UTC (rev 3264)
+++ debian/trunk/tests/common/compare_file.pl	2010-08-28 18:05:03 UTC (rev 3265)
@@ -17,9 +17,12 @@
 		$file =~ s/^$user:([^:]*):(.*)$/$user:\@PASS_DES $pass\@:$2/m;
 		my $cryptpass = $1;
 		# Check the password
-		my $checkpass = qx|/usr/bin/openssl passwd -crypt -salt '$cryptpass' $pass|;
+		my $checkpass = qx|/usr/bin/openssl passwd -crypt -salt '$cryptpass' $pass 2>tmp/openssl.err|;
 		chomp $checkpass;
 
+		system "cat tmp/openssl.err"
+			if ($checkpass ne $cryptpass);
+		system "rm -f tmp/openssl.err";
 		die "Wrong password for $user: '$cryptpass'. Expected password: '$checkpass'\n"
 			if ($checkpass ne $cryptpass);
 	} else {




More information about the Pkg-shadow-commits mailing list