Do not fail if the expected user is not present in the file, give an
useful warning.
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user