[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: openldap-2.1.14 + ldapdb.c: slapd core dumped: gdb bt & truss



Thanks for the back-trace. I've patched this problem in CVS HEAD. Here's the
fix if you want to apply it to your own source:

diff -u -r1.74 -r1.75
--- saslauthz.c 16 Feb 2003 18:34:29 -0000      1.74
+++ saslauthz.c 1 Mar 2003 23:21:24 -0000       1.75
@@ -693,7 +693,7 @@
        }

        /* Allow the manager to authorize as any DN. */
-       if( be_isroot( conn->c_authz_backend, authcDN )) {
+       if( conn->c_authz_backend && be_isroot( conn->c_authz_backend,
authcDN )) {
                rc = LDAP_SUCCESS;
                goto DONE;
        }

Of course, the reason you tripped on this is because you didn't setup a
sasl-regexp map as explained in the ldapdb README file. Go read it.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Alex Deiter
> Sent: Saturday, March 01, 2003 8:19 AM
> To: openldap-software@OpenLDAP.org
> Subject: Re: openldap-2.1.14 + ldapdb.c: slapd core dumped:
> gdb bt & truss
>
>
> Hello!
>
> I rebuild openldap-2.1.14 without threads
> (--without-threads), with debug
> symbols (-g), and run
>
> # truss -o slapd.truss /usr/local/libexec/slapd -h "ldaps:/// ldap:///
> ldapi:///"
>
> # ./server -p 7777
> ....
> # ./client -p 7777 deiter
> ...
>
> Mar  1 19:07:05 deiter /kernel: pid 19712 (slapd), uid 0:
> exited on signal
> 11 (core dumped)
>
> # tail -25 slapd.truss
> getpid()                                         = 19711 (0x4cff)
> sendto(0x4,0xbfbff22c,0x34e,0x0,0x0,0x0)         = 846 (0x34e)
> gettimeofday(0xbfbfed84,0x0)                     = 0 (0x0)
> getpid()                                         = 19711 (0x4cff)
> sendto(0x4,0xbfbff22c,0x4a,0x0,0x0,0x0)          = 74 (0x4a)
> gettimeofday(0xbfbfed84,0x0)                     = 0 (0x0)
> getpid()                                         = 19711 (0x4cff)
> sendto(0x4,0xbfbff22c,0x145,0x0,0x0,0x0)         = 325 (0x145)
> gettimeofday(0xbfbfed84,0x0)                     = 0 (0x0)
> getpid()                                         = 19711 (0x4cff)
> sendto(0x4,0xbfbff22c,0x49,0x0,0x0,0x0)          = 73 (0x49)
> gettimeofday(0xbfbfed84,0x0)                     = 0 (0x0)
> getpid()                                         = 19711 (0x4cff)
> sendto(0x4,0xbfbff22c,0xe8,0x0,0x0,0x0)          = 232 (0xe8)
> break(0x8145000)                                 = 0 (0x0)
> sigaction(SIGUSR1,0xbfbffac4,0xbfbffaac)         = 0 (0x0)
> sigaction(SIGUSR2,0xbfbffab4,0xbfbffa9c)         = 0 (0x0)
> sigaction(SIGPIPE,0xbfbffac4,0xbfbffaac)         = 0 (0x0)
> sigaction(SIGHUP,0xbfbffab4,0xbfbffa9c)          = 0 (0x0)
> sigaction(SIGINT,0xbfbffac4,0xbfbffaac)          = 0 (0x0)
> sigaction(SIGTERM,0xbfbffab4,0xbfbffa9c)         = 0 (0x0)
> sigaction(SIGCHLD,0xbfbffac4,0xbfbffaac)         = 0 (0x0)
> getrlimit(0x8,0xbfbffa8c)                        = 0 (0x0)
> fork()                                           = 19712 (0x4d00)
> exit(0x0)                                       process exit, rval = 0
>
>
> # gdb /usr/local/libexec/slapd ./slapd.core
> GNU gdb 4.18 (FreeBSD)
> Core was generated by `slapd'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /usr/local/lib/libdb41.so.1...done.
> Reading symbols from /usr/local/lib/libsasl2.so.2...done.
> Reading symbols from /usr/lib/libssl.so.2...done.
> Reading symbols from /usr/lib/libcrypto.so.2...done.
> Reading symbols from /usr/lib/libfetch.so.3...done.
> Reading symbols from /usr/lib/libcom_err.so.2...done.
> Reading symbols from /usr/lib/libwrap.so.3...done.
> Reading symbols from /usr/lib/libc.so.4...done.
> Reading symbols from /usr/local/lib/sasl2/libsasldb.so...done.
> Reading symbols from /usr/local/lib/sasl2/libcrammd5.so...done.
> Reading symbols from /usr/local/lib/sasl2/libdigestmd5.so...done.
> Reading symbols from /usr/local/lib/sasl2/libotp.so...done.
> Reading symbols from /usr/lib/libopie.so.2...done.
> Reading symbols from /usr/lib/libmd.so.2...done.
> Reading symbols from /usr/local/lib/sasl2/libplain.so...done.
> Reading symbols from /usr/lib/libcrypt.so.2...done.
> Reading symbols from /usr/local/lib/sasl2/libanonymous.so...done.
> Reading symbols from /usr/local/lib/sasl2/liblogin.so...done.
> Reading symbols from /usr/local/lib/sasl2/libntlm.so...done.
> Reading symbols from /usr/local/lib/sasl2/libldapdb.so...done.
> Reading symbols from /usr/local/lib/libldap.so.2...done.
> Reading symbols from /usr/local/lib/liblber.so.2...done.
> Reading symbols from /usr/libexec/ld-elf.so.1...done.
> #0  be_isroot (be=0x0, ndn=0xbfbfed24) at backend.c:606
> 606             if ( !be->be_rootndn.bv_len ) {
> (gdb) bt
> #0  be_isroot (be=0x0, ndn=0xbfbfed24) at backend.c:606
> #1  0x807aeeb in slap_sasl_authorized (conn=0x814bc64,
> authcDN=0xbfbfed24,
>     authzDN=0xbfbfed1c) at saslauthz.c:695
> #2  0x807e110 in slap_sasl_authorize (sconn=0x8146000,
> context=0x814bc64,
>     requested_user=0x8146910 "u:deiter", rlen=8,
>     auth_identity=0x8146a11
> "uidNumber=0+gidNumber=0,cn=peercred,cn=external,cn=auth", alen=55,
> def_realm=0x0, urlen=0, props=0x8103960) at sasl.c:750
> #3  0x281a71e6 in do_authorization () from
> /usr/local/lib/libsasl2.so.2
> #4  0x281a776a in sasl_server_step () from
> /usr/local/lib/libsasl2.so.2
> #5  0x281a75e4 in sasl_server_start () from
> /usr/local/lib/libsasl2.so.2
> #6  0x807ea66 in slap_sasl_bind (conn=0x814bc64, op=0x8143c80,
> dn=0xbfbfef18,
>     ndn=0xbfbfef20, cred=0xbfbfef34, edn=0xbfbfef08, ssfp=0xbfbfef10)
>     at sasl.c:1355
> #7  0x8064b94 in do_bind (conn=0x814bc64, op=0x8143c80) at bind.c:307
> #8  0x8050ef8 in connection_operation (ctx=0x0, arg_v=0x8144750)
>     at connection.c:922
> #9  0x80a30c7 in ldap_pvt_thread_pool_submit (pool=0x80e5228,
>     start_routine=0x8050e0c <connection_operation>, arg=0x8144750)
>     at thr_stub.c:159
> #10 0x8051c15 in connection_op_activate (conn=0x814bc64, op=0x8143c80)
>     at connection.c:1625
> #11 0x80518e8 in connection_input (conn=0x814bc64) at
> connection.c:1496
> #12 0x8051511 in connection_read (s=13) at connection.c:1265
> #13 0x804f3fd in slapd_daemon_task (ptr=0x0) at daemon.c:1868
> #14 0x80a3011 in ldap_pvt_thread_create (thread=0xbfbffae8, detach=0,
>     start_routine=0x804dfe0 <slapd_daemon_task>, arg=0x0) at
> thr_stub.c:48
> #15 0x804f60e in slapd_daemon () at daemon.c:1957
> #16 0x804c3f8 in main (argc=3, argv=0xbfbffb80) at main.c:567
> #17 0x804bb75 in _start ()
> (gdb)
>
> Any ideas?
>
> Thanks!
>
>
>
>