The Samba-Bugzilla – Bug 3281
segfault in pdb_ldap when built against libldap 2.3 on x86_64
Last modified: 2005-11-24 06:56:05 UTC
When built against libldap from OpenLDAP 2.3 on x86_64, smbd segfaults when using pdb_ldap.
I found it easier to reproduce with pdbedit:
[root@build ~]# gdb pdbedit
GNU gdb 6.3-5mdk (Mandriva Linux release 2006.0)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-mandriva-linux-gnu"...Using host libthread_db library "/lib64/tls/libthread_db.so.1".
(gdb) run -L
Starting program: /usr/bin/pdbedit -L
Program received signal SIGSEGV, Segmentation fault.
ldap_count_values (vals=0x2ad0a3c0) at getvalues.c:153
153 for ( i = 0; vals[i] != NULL; i++ )
#0 ldap_count_values (vals=0x2ad0a3c0) at getvalues.c:153
#1 0x000000552ab3dc4d in smbldap_check_root_dse () from /usr/bin/pdbedit
#2 0x000000552ab3dd60 in smbldap_has_control () from /usr/bin/pdbedit
#3 0x000000552ab3c3d0 in smbldap_connect_system () from /usr/bin/pdbedit
#4 0x000000552ab3c64a in smbldap_open () from /usr/bin/pdbedit
#5 0x000000552ab3c841 in another_ldap_try () from /usr/bin/pdbedit
#6 0x000000552ab3cb9b in smbldap_search_ext () from /usr/bin/pdbedit
#7 0x000000552ab3cc23 in smbldap_search () from /usr/bin/pdbedit
#8 0x000000552ab3d4f9 in smbldap_search_suffix () from /usr/bin/pdbedit
#9 0x000000552ab3e3d6 in smbldap_search_domain_info () from /usr/bin/pdbedit
#10 0x000000552aaf3881 in pdb_init_ldapsam () from /usr/bin/pdbedit
#11 0x000000552aae4379 in make_pdb_methods_name () from /usr/bin/pdbedit
#12 0x000000552aae4911 in make_pdb_context_list () from /usr/bin/pdbedit
#13 0x000000552aae4bbf in pdb_get_static_context () from /usr/bin/pdbedit
#14 0x000000552aae5504 in initialize_password_db () from /usr/bin/pdbedit
#15 0x000000552aad0be7 in main () from /usr/bin/pdbedit
There are no problems under x86 (with exaclt the same versions), or with OpenLDAP 2.2 (on x86_64).
Samba 3.0.20b exhibits the same behaviour.
OpenLDAP developers don't think this is their bug.
What exact version of OpenLDAP did you compile with?
(Could not reproduce with OpenLDAP 2.3.11)
Sorry, ensuring LDAP_DEPRECATED is really defined avoids this.