From f7679480e631f29d706b36bc890446e674ed5e2d Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Mon, 11 Feb 2008 19:48:56 +0000 Subject: [PATCH] Re-indent. --- tests/common/compare_file.pl | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/common/compare_file.pl b/tests/common/compare_file.pl index a4e07661..4e3a5698 100755 --- a/tests/common/compare_file.pl +++ b/tests/common/compare_file.pl @@ -14,14 +14,14 @@ while ($tmp =~ m/^(.*?)([^\n]*):\@PASS_DES ([^:]*)\@:(.*)$/s) { 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 - my $checkpass = qx|/usr/bin/openssl passwd -crypt -salt $cryptpass $pass|; - chomp $checkpass; + $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|; + chomp $checkpass; - die "Wrong password: '$cryptpass'. Expected password: '$checkpass'\n" - if ($checkpass ne $cryptpass); + die "Wrong password: '$cryptpass'. Expected password: '$checkpass'\n" + if ($checkpass ne $cryptpass); } else { die "No user '$user' in ".$ARGV[1].".\n"; } @@ -33,16 +33,16 @@ while ($tmp =~ m/^(.*?)([^\n]*):\@PASS_MD5 (.*)\@:(.*)$/s) { 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 - my $salt = $cryptpass; - $salt =~ s/^\$1\$//; - my $checkpass = qx|/usr/bin/openssl passwd -1 -salt '$salt' '$pass'|; - chomp $checkpass; + $file =~ s/^$user:([^:]*):(.*)$/$user:\@PASS_MD5 $pass\@:$2/m; + my $cryptpass = $1; + # Check the password + my $salt = $cryptpass; + $salt =~ s/^\$1\$//; + my $checkpass = qx|/usr/bin/openssl passwd -1 -salt '$salt' '$pass'|; + chomp $checkpass; - die "Wrong password: '$cryptpass'. Expected password: '$checkpass'\n" - if ($checkpass ne $cryptpass); + die "Wrong password: '$cryptpass'. Expected password: '$checkpass'\n" + if ($checkpass ne $cryptpass); } else { die "No user '$user' in ".$ARGV[1].".\n"; }