Easier handling of mapped cracklib strings.

This commit is contained in:
Chris 2013-02-17 13:50:58 +00:00
parent 743d8a6847
commit 53df2b9491

View File

@ -395,7 +395,13 @@ sub apply_policy {
# If mapres is the same as crackres (ie: mapping to a localisable string ID failed),
# try to at least make it more readable
$mapres =~ s/^it/The password/ if($mapres eq $crackres);
if($mapres eq $crackres) {
$mapres =~ s/^it/The password/;
# Otherwise, wrap in langvar marker stuff
} else {
$mapres = "{L_".$mapres."}";
}
$failures -> {"policy_use_cracklib"} = [1, $mapres]
}