[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#4168) autofs with ldap triggers segfault in kernel
> Pierangelo Masarati wrote:
>> Some debugging symbols, at least the line number would have been of
>> help; anyway, this is more and more convincing of my suspicion about
>> some 64 bit issue (I haven't noticed yet on my amd64, though) because
>> ldap_{sg}et_option() do a lot of pointer-to-anytype conversion with
>> explicit casts, and this is a typical good chance for type mismatch
>> because the cast inhibits compiler warnings.
>>
>> Can you try your best to get line numbers out of there?
> I've rebuild openldap, ensuring -g option is used (which was not the
> case previously), here it is:
>
> (gdb) bt full
> #0 ldap_set_option (ld=0x55667200, option=17, invalue=0x7fffffb13d44)
> at options.c:358
> lo = Variable "lo" is not available.
> (gdb) bt
> #0 ldap_set_option (ld=0x55667200, option=17, invalue=0x7fffffb13d44)
> at options.c:358
This appears to be
357: if(ld != NULL) {
358: assert( LDAP_VALID( ld ) );
359:
360: if( !LDAP_VALID( ld ) ) {
Note that this code doesn't really differ from OpenLDAP 2.2's, and it's
been there since '99: cvs annotate gives
1.52 (kurt 08-Jun-00): if(ld != NULL) {
1.26 (kdz 28-May-99): assert( LDAP_VALID( ld ) );
1.26 (kdz 28-May-99):
1.26 (kdz 28-May-99): if( !LDAP_VALID( ld ) ) {
Also, I note that "ld" is passed as it is returned by ldap_init() in
autofs-4.1.4/modules/lookup_ldap.c; if ldap_init() returned a NULL,
ldap_set_option() would not be invoked. None of Mandriva patches seem to
affect the ldap-related code.
I suspect the real issue is going on in ldap_init(), although I don't see
many changes from 2.2 even there.
> #1 0x00002aaaaaf00ba8 in do_connect (ctxt=0x555555665740,
> result_ldap=0x7fffffb13d94) at lookup_ldap.c:66
> #2 0x00002aaaaaf00e70 in lookup_init (mapfmt=0x2aaaaaf03920 "sun",
> argc=1,
> argv=0x7fffffb13f98, context=Variable "context" is not available.
> ) at lookup_ldap.c:180
> #3 0x000055555555aac9 in open_lookup (name=0x7fffffb14a20 "ldap",
> err_prefix=0x55555555c4dd "", mapfmt=0x0, argc=1, argv=0x7fffffb13f98)
> at module.c:83
> #4 0x0000555555559da3 in main (argc=Variable "argc" is not available.
> ) at automount.c:1762
Did you compile with -DLDAP_DEPRECATED?
p.
--
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it
Ing. Pierangelo Masarati
Responsabile Open Solution
SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office: +39.02.23998309
Mobile: +39.333.4963172
Email: pierangelo.masarati@sys-net.it
------------------------------------------