[gnome-control-center/uajain/handle-passwd-with-ldap: 25/25] user-accounts: Fix password check when using LDAP
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/uajain/handle-passwd-with-ldap: 25/25] user-accounts: Fix password check when using LDAP
- Date: Thu, 6 Jun 2019 07:14:04 +0000 (UTC)
commit 7cbccd357814a6c0f2a8574d0f8b49da9e581b43
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]