[gnome-control-center/uajain/handle-passwd-with-ldap] user-accounts: Fix password check when using LDAP
- From: Umang Jain <uajain src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/uajain/handle-passwd-with-ldap] user-accounts: Fix password check when using LDAP
- Date: Wed, 5 Jun 2019 15:30:01 +0000 (UTC)
commit 509cdc23c9c7c5c6d1db4dbbd4a82b901cd3984c
Author: Chris Coulson <chris coulson canonical com>
Date: Thu Mar 15 23:54:34 2018 +0000
user-accounts: Fix password check when using LDAP
Usually, passwd exits with an error if the current password is incorrect,
however, when using LDAP, it askes for password again. It causes hangs as
the passwd helper assumes that the password is correct. Let's prevent this
hangs using additional check for "incorrect" keyword.
Based on a patch from https://launchpad.net/bugs/607357 made by Ryan Tandy.
https://bugzilla.gnome.org/show_bug.cgi?id=786530
panels/user-accounts/run-passwd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/panels/user-accounts/run-passwd.c b/panels/user-accounts/run-passwd.c
index 00239ce0f..0fd06d903 100644
--- a/panels/user-accounts/run-passwd.c
+++ b/panels/user-accounts/run-passwd.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]