Handle the case where passwd re-asks for the current password when it was entered...
authorChris Coulson <chris.coulson@canonical.com>
Thu, 15 Mar 2018 23:54:34 +0000 (23:54 +0000)
committerMichael Biebl <biebl@debian.org>
Wed, 11 Apr 2018 16:20:17 +0000 (17:20 +0100)
Based on a patch from Ryan Tandy
Bug-Ubuntu: https:/launchpad.net/bugs/607357
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=786530
Forwarded: yes

Gbp-Pq: Name 06_handle_passwd_with_ldap.patch

panels/user-accounts/run-passwd.c

index 00239ce0ff362edef6548d6f04089a83a87ec0d8..0fd06d903b263b999c5d981e4d9a1e36ee45671e 100644 (file)
@@ -404,7 +404,7 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswdHandler *pass
 
                         if (is_string_complete (str->str, "assword: ", "failure", "wrong", "error", NULL)) {
 
-                                if (strstr (str->str, "assword: ") != NULL) {
+                                if (strstr (str->str, "assword: ") != NULL && strstr (str->str, "incorrect") == NULL) {
                                         /* Authentication successful */
 
                                         passwd_handler->backend_state = PASSWD_STATE_NEW;