[exim-dev] [Bug 2813] unable to send mail with PAM auth

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: admin
Data:  
Para: exim-dev
Temas antigos: [exim-dev] [Bug 2813] New: exim-4.95: unable to send mail, no host name found loop
Asunto: [exim-dev] [Bug 2813] unable to send mail with PAM auth
https://bugs.exim.org/show_bug.cgi?id=2813

Adam Lackorzynski <adam@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adam@???


--- Comment #15 from Adam Lackorzynski <adam@???> ---
Hi,

I was seeing a similar issue in my setup. Tracing things down through libpam
yielded into this patch for exim. I have not investigated exim's malloc
implementation, however the following works for me:

commit 5f49114b9c23a36a14bcc3f1903997ed94701af0 (HEAD -> master)
Author: Adam Lackorzynski <adam@???>
Date: Sat Oct 16 15:56:05 2021 +0200

    PAM: Use libc malloc as PAM is freeing memory


diff --git a/src/src/auths/call_pam.c b/src/src/auths/call_pam.c
index 80bb23ec3..511058d15 100644
--- a/src/src/auths/call_pam.c
+++ b/src/src/auths/call_pam.c
@@ -88,7 +88,9 @@ for (int i = 0; i < num_msg; i++)
        arg = US"";
        pam_arg_ended = TRUE;
        }
-      reply[i].resp = CS string_copy_malloc(arg); /* PAM frees resp */
+      unsigned len = strlen(arg) + 1;
+      reply[i].resp = malloc(len); /* Use libc malloc, PAM frees resp */
+      memcpy(reply[i].resp, arg, len);
       reply[i].resp_retcode = PAM_SUCCESS;
       break;


Thanks.

--
You are receiving this mail because:
You are on the CC list for the bug.