[Dovecot] rc12 dovecot-auth core dump with ldap

Chris Wakelin c.d.wakelin at reading.ac.uk
Tue Nov 7 12:38:00 UTC 2006


Hi,

I've got a core dump during initialisation when I use 1.0.rc12 and LDAP
with authenticated binds in Solaris. It worked OK in 1.0.rc10. Here's
the non-commented entries in dovecot-ldap.conf - some of which are
probably redundant :) :-

hosts = xxx.yyy.rdg.ac.uk
auth_bind = yes
auth_bind_userdn = "cn=%n,cn=users,dc=xxx,dc=yyy,dc=rdg,dc=ac,dc=uk"
ldap_version = 3
base = "dc=xxx,dc=yyy,dc=rdg,dc=ac,dc=uk"
deref = never
scope = subtree
user_filter = (&(objectClass=User)(sAMAccountName=%n))
pass_filter = (&(objectClass=User)(sAMAccountName=%n))

Strangely, it crashes in a different place when I don't define the
scope, so I'm guessing it's something to do with reading parameters.

backtrace with "scope = subtree" :

#0  0x1ec94 in db_ldap_init (
    config_path=0x5bc08 "/opt/RDGdovect/etc/dovecot-ldap.conf")
    at db-ldap.c:661
661             if (*conn->set.user_global_gid == '\0')
(gdb) bt
#0  0x1ec94 in db_ldap_init (
    config_path=0x5bc08 "/opt/RDGdovect/etc/dovecot-ldap.conf")
    at db-ldap.c:661
#1  0x246e8 in passdb_ldap_preinit (auth_passdb=0x5bbe8,
    args=0x5bc08 "/opt/RDGdovect/etc/dovecot-ldap.conf") at
passdb-ldap.c:486
#2  0x2328c in passdb_preinit (auth=0x5b838, driver=0xffbefec0 "ldap",
    args=0x0, id=332176) at passdb.c:169
#3  0x17648 in auth_preinit () at auth.c:45
#4  0x1ff0c in drop_privileges () at main.c:195
#5  0x2024c in main (argc=0, argv=0xffbefb54) at main.c:319

and with scope left commented out:

#0  0xff0cf600 in strcasecmp () from /usr/lib/libc.so.1
(gdb) bt
#0  0xff0cf600 in strcasecmp () from /usr/lib/libc.so.1
#1  0x1df58 in scope2str (str=0x0) at db-ldap.c:116
#2  0x1ec4c in db_ldap_init (
    config_path=0x5bc08 "/opt/RDGdovect/etc/dovecot-ldap.conf")
    at db-ldap.c:648
#3  0x246e8 in passdb_ldap_preinit (auth_passdb=0x5bbe8,
    args=0x5bc08 "/opt/RDGdovect/etc/dovecot-ldap.conf") at
passdb-ldap.c:486
#4  0x2328c in passdb_preinit (auth=0x5b838, driver=0xffbefec0 "ldap",
    args=0x0, id=332176) at passdb.c:169
#5  0x17648 in auth_preinit () at auth.c:45
#6  0x1ff0c in drop_privileges () at main.c:195
#7  0x2024c in main (argc=0, argv=0xffbefb54) at main.c:319

If I don't define "deref" then I get an error in the dovecot log (but no
crash) :-

dovecot: Nov 07 12:36:45 Error: auth(default): LDAP: Unknown deref
option 'subtree'

I'll keep digging and see if I can find the cause, but has anybody else
seen this?

Chris

-- 
--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-
Christopher Wakelin,                           c.d.wakelin at reading.ac.uk
IT Services Centre, The University of Reading,  Tel: +44 (0)118 378 8439
Whiteknights, Reading, RG6 2AF, UK              Fax: +44 (0)118 975 3094


More information about the dovecot mailing list