[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Seva Adari wrote:
> Taking a clue from the above quote from 'info ld' (on a RedHat 6.2
> system), I have built SASL library with '-Wl,-Bsymbolic' flag for
> 'ld' and rebuilt imap & ldap with no luck.
No, no, it is not a linking problem.
Cyrus SASL does not call malloc and friends with that name. Every
time one of those routines is needed, libsasl finds it in a table.
That table can be changed by the caller and libldap does, that is,
libldap asks that libsasl uses ad-hoc routines.
Now the problem is that no one thought that libsasl could call
libldap. And that happens when pwcheck_method is PAM and pam_ldap
is used.
So a program, say, Cyrus IMAP, starts and uses libsasl. Any
needed memory allocation is managed by whatever routines are
default or set by the main program. Now libsasl calls libpam,
that calls pam_ldap, that calls libldap. The latter changes the
memory manager by calling sasl_set_alloc. Now libldap returns,
pam_ldap returns, libpam returns (one of those unloads libldap
in the process), and libsasl tries to clean up no-longer needed
objects. This it does by calling the routines that libldap set
with sasl_set_alloc. But they are no longer there...
I think that is what happens. If you take libraries/libldap/cyrus.c
in OpenLDAP and delete the call to sasl_set_alloc, the thing works.
I don't know, however, what is the permament fix.
All the best,
Julio