[accounts-dialog] Catch more errors



commit 440cce53ff9b48fd537249a95fde559fa1f736d0
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Feb 4 15:24:44 2010 -0500

    Catch more errors

 src/run-passwd.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/run-passwd.c b/src/run-passwd.c
index 0a5419b..a467303 100644
--- a/src/run-passwd.c
+++ b/src/run-passwd.c
@@ -459,6 +459,8 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswdHandler *pass
                                                 "match",
                                                 "1 numeric or special",
                                                 "failure",
+                                                "DIFFERENT",
+                                                "BAD PASSWORD",
                                                 NULL)) {
 
                                 if (strstr (str->str, "successfully") != NULL) {
@@ -503,6 +505,9 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswdHandler *pass
                                                 error = g_error_new (PASSWD_ERROR, PASSWD_ERROR_AUTH_FAILED,
                                                                      _("Your password has been changed since you initially authenticated!"));
                                         }
+                                        else if (strstr (str->str, "DIFFERENT")) {
+                                                error = g_error_new (PASSWD_ERROR, PASSWD_ERROR_REJECTED,
+                                                                     _("The new password does not contain enough different characters"));
                                         else {
                                                 error = g_error_new (PASSWD_ERROR, PASSWD_ERROR_UNKNOWN,
                                                                      _("Unknown error"));



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