[gnome-system-tools] Fix hang changing password when pam-cracklib is enabled



commit c0f43403eb326500a93c2fb5e384892ffd4e9d1a
Author: Milan Bouchet-Valat <nalimilan club fr>
Date:   Wed Jan 27 12:58:26 2010 +0100

    Fix hang changing password when pam-cracklib is enabled
    
    When pam-cracklib is used, using an existing word prompts 'passwd' to output
    WEAK PASSWORD: it's based on a dictionary word
    Detect "dictionary" too and consider this as meaning "Password is too simple".

 src/users/run-passwd.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/users/run-passwd.c b/src/users/run-passwd.c
index 49efecd..b55b4b6 100644
--- a/src/users/run-passwd.c
+++ b/src/users/run-passwd.c
@@ -460,6 +460,7 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswdHandler *pass
 			                        "short",
 			                        "longer",
 			                        "palindrome",
+			                        "dictionary",
 			                        "simple",
 			                        "similar",
 			                        "wrapped",
@@ -492,7 +493,8 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswdHandler *pass
 						error = g_error_new (PASSWD_ERROR, PASSWD_ERROR_REJECTED,
 						                     _("The new password is too short"));
 					} else if (g_strrstr (str->str, "palindrome") != NULL ||
-						   g_strrstr (str->str, "simple") != NULL) {
+						   g_strrstr (str->str, "simple") != NULL ||
+						   g_strrstr (str->str, "dictionary") != NULL) {
 						error = g_error_new (PASSWD_ERROR, PASSWD_ERROR_REJECTED,
 						                     _("The new password is too simple"));
 					} else if (g_strrstr (str->str, "similar") != NULL ||



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]