From 657892545f117ceb02b6f1ac3924305cdd1b260d Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Tue, 21 Apr 2009 21:47:45 -0400 Subject: [PATCH] Since cracklib uses locale specific strings, do the same when comparing pinentry quality strings. This whole scheme is kinda hokey. Need a better way. --- src/pinentry.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/pinentry.c b/src/pinentry.c index ec56691e..177e3585 100644 --- a/src/pinentry.c +++ b/src/pinentry.c @@ -82,27 +82,27 @@ static int quality_cb(void *data, const char *line) if (!(tmp = FascistCheck(line+8, CRACKLIB_DICT))) return assuan_send_data(pin->ctx, "100", 3); - if (!strcmp(tmp, "it's WAY too short")) + if (!strcmp(tmp, N_("it's WAY too short"))) score = 10; - else if (!strcmp(tmp, "it is too short")) + else if (!strcmp(tmp, N_("it is too short"))) score = 20; - else if (!strcmp(tmp, "it is all whitespace")) + else if (!strcmp(tmp, N_("it is all whitespace"))) score = 25; - else if (!strcmp(tmp, "it is based on your username")) + else if (!strcmp(tmp, N_("it is based on your username"))) score = 30; - else if (!strcmp(tmp, "it is based on a dictionary word")) + else if (!strcmp(tmp, N_("it is based on a dictionary word"))) score = 40; - else if (!strcmp(tmp, "it is based upon your password entry")) + else if (!strcmp(tmp, N_("it is based upon your password entry"))) score = 50; - else if (!strcmp(tmp, "it's derived from your password entry")) + else if (!strcmp(tmp, N_("it's derived from your password entry"))) score = 50; - else if (!strcmp(tmp, "it is based on a (reversed) dictionary word")) + else if (!strcmp(tmp, N_("it is based on a (reversed) dictionary word"))) score = 60; - else if (!strcmp(tmp, "it is derivable from your password entry")) + else if (!strcmp(tmp, N_("it is derivable from your password entry"))) score = 70; - else if (!strcmp(tmp, "it does not contain enough DIFFERENT characters")) + else if (!strcmp(tmp, N_("it does not contain enough DIFFERENT characters"))) score = 80; - else if (!strcmp(tmp, "it is too simplistic/systematic")) + else if (!strcmp(tmp, N_("it is too simplistic/systematic"))) score = 90; else score = 0; -- 2.11.4.GIT