On Fri, 2010-08-06 at 14:30 +0200, Elmar Rudigier wrote:

> After a little debugging I saw that pam_ssh and dovecot both provide a
> buffer_free() function. During cleanup of pam_ssh the buffer_free() from
> dovecot was called. The members of the buffer had all "out of bound"
> addresses.
> 
> After rename the buffer_free() in dovecot the pam login works fine.

Why not rename it in pam_ssh? PAM is the library that is being used in
tons of different programs, and it should be the one to avoid symbol
conflicts.

Anyway, attached a simpler patch to fix this on Dovecot's side (but I'm
not including it).

diff -r 641e86843234 src/lib/buffer.h
--- a/src/lib/buffer.h	Thu Aug 05 18:43:23 2010 +0100
+++ b/src/lib/buffer.h	Fri Aug 06 13:54:34 2010 +0100
@@ -1,6 +1,8 @@
 #ifndef BUFFER_H
 #define BUFFER_H
 
+#define buffer_free buffer_free_pamssh_sucks
+
 struct buffer {
 	const void *data;
 	const size_t used;

Reply via email to