Do not fail if the expected user is not present in the file, give an

useful warning.
This commit is contained in:
nekral-guest
2008-02-11 19:47:53 +00:00
parent ca42fa251a
commit 3354e2dce7
+6
View File
@@ -22,6 +22,9 @@ while ($tmp =~ m/^(.*?)([^\n]*):\@PASS_DES ([^:]*)\@:(.*)$/s) {
die "Wrong password: '$cryptpass'. Expected password: '$checkpass'\n"
if ($checkpass ne $cryptpass);
} else {
die "No user '$user' in ".$ARGV[1].".\n";
}
}
$tmp = $template;
@@ -40,6 +43,9 @@ while ($tmp =~ m/^(.*?)([^\n]*):\@PASS_MD5 (.*)\@:(.*)$/s) {
die "Wrong password: '$cryptpass'. Expected password: '$checkpass'\n"
if ($checkpass ne $cryptpass);
} else {
die "No user '$user' in ".$ARGV[1].".\n";
}
}