From 8298766d2dc84dd8c2e2fa11c133c15a54173482 Mon Sep 17 00:00:00 2001 From: Oz Tiram Date: Sun, 4 Aug 2024 21:43:53 +0200 Subject: [PATCH] fix: support change password with passwdqc This one was quite tricky ... On systems where pam_passwdqc is installed the prompt for password after succesfully authenticating is not: ``` New password: ``` But: ``` Enter new password: ``` See: https://github.com/openwall/passwdqc/blob/7bf266fcf6ce9782b73722664e36dabd68f48c48/pam_passwdqc.c#L64 passwdqc is installed by default in Gentoo, but might be also installed in other Linux distributions. --- capplets/about-me/mate-about-me-password.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capplets/about-me/mate-about-me-password.c b/capplets/about-me/mate-about-me-password.c index 2b4f04410..6d739f6f8 100644 --- a/capplets/about-me/mate-about-me-password.c +++ b/capplets/about-me/mate-about-me-password.c @@ -474,7 +474,7 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswordDialog *pdi /* Which response did we get? */ passdlg_set_busy (pdialog, FALSE); - if (g_strrstr (str->str, "New password: ") != NULL) { + if ((g_strrstr (str->str, "New password: ") != NULL) || (g_strrstr (str->str, "Enter new password: ") != NULL)) { /* Authentication successful */ authenticated_user (pdialog, FALSE);