On 11/07/2024 16:30, Sumit Bose wrote:
Am Thu, Jul 11, 2024 at 02:43:50PM +0200 schrieb Grzegorz Sobanski:

Hi,
continuing discussion form ticket - I applied the change from master to
2.9.4 with patches from Rocky9.4.
And while your first change from your private fork did fixed our issue, this
patch unfortunately didn't.

As requested I attach logs from 2.9.4 from Rocky9.4 with the patch applied.

Hi,

thank you for the logs. Please try to add

diff --git a/src/sss_client/pam_sss.c b/src/sss_client/pam_sss.c
index d43bd0f55..d1101e16c 100644
--- a/src/sss_client/pam_sss.c
+++ b/src/sss_client/pam_sss.c
@@ -2505,8 +2505,13 @@ static int prompt_by_config(pam_handle_t *pamh, struct 
pam_items *pi)
              ret = prompt_password(pamh, pi, 
pc_get_password_prompt(pi->pc[c]));
              break;
          case PC_TYPE_2FA:
-            ret = prompt_2fa(pamh, pi, false, pc_get_2fa_1st_prompt(pi->pc[c]),
-                             pc_get_2fa_2nd_prompt(pi->pc[c]));
+            if (pi->password_prompting) {
+                ret = prompt_2fa(pamh, pi, true, 
pc_get_2fa_1st_prompt(pi->pc[c]),
+                                 pc_get_2fa_2nd_prompt(pi->pc[c]));
+            } else {
+                ret = prompt_2fa(pamh, pi, false, 
pc_get_2fa_1st_prompt(pi->pc[c]),
+                                 pc_get_2fa_2nd_prompt(pi->pc[c]));
+            }
              break;
          case PC_TYPE_2FA_SINGLE:
              ret = prompt_2fa_single(pamh, pi,



to your build and let me know if this fixes the issue for you.

Hi,
yes, this patch fixes the issue.
Thanks!

If you would like me to test anything more, it will have to wait 2 weeks, as I'm going on vacations.

Cheers,
Grzegorz
--
_______________________________________________
sssd-users mailing list -- sssd-users@lists.fedorahosted.org
To unsubscribe send an email to sssd-users-le...@lists.fedorahosted.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/sssd-users@lists.fedorahosted.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to