Red Hat Bugzilla – Bug 240788
bind_sdb, ldap2zone segfaulting
Last modified: 2013-04-30 19:35:53 EDT
+++ This bug was initially created as a clone of Bug #239802 +++
bind_sdb and ldap2zone segfaulting when using ldap.
Version-Release number of selected component (if applicable):
ldap.h is not correctly included during compilation, so ldap_* functions are
implicitly declared like returning int (some of those return pointers, so on
x86_64 the pointer is truncated to 32 bits -> segfault), package build
finishes ok but binaries are broken. LDAP_DEPRECATED should be defined during
#rpmbuild -bi /usr/src/redhat/SPECS/bind.spec
gcc -fPIE -I/usr/src/redhat/BUILD/bind-9.3.4 -I./include -I./unix/include
-I../../lib/isc/pthreads/include -D_REENTRANT -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4
-m64 -mtune=generic -I/usr/kerberos/include -W -Wall -Wmissing-prototypes
-Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing -c
ldapdb.c: In function 'ldapdb_getconn':
ldapdb.c:138: warning: implicit declaration of function 'ldap_unbind'
ldapdb.c: In function 'ldapdb_bind':
ldapdb.c:200: warning: implicit declaration of function 'ldap_open'
ldapdb.c:200: warning: assignment makes pointer from integer without a cast
ldapdb.c:214: warning: implicit declaration of function 'ldap_simple_bind_s'
ldapdb.c: In function 'ldapdb_search':
ldapdb.c:260: warning: implicit declaration of function 'ldap_search'
ldapdb.c:296: warning: implicit declaration of function 'ldap_get_values'
ldapdb.c:296: warning: assignment makes pointer from integer without a cast
ldapdb.c:301: warning: assignment makes pointer from integer without a cast
ldapdb.c:304: warning: implicit declaration of function 'ldap_value_free'
ldapdb.c:322: warning: assignment makes pointer from integer without a cast
-- Additional comment from email@example.com on 2007-05-11 11:39 EST --
(In reply to comment #0)
> finishes ok but binaries are broken. LDAP_DEPRECATED should be defined during
Better solution is change functions to newer than using deprecated API
-- Additional comment from firstname.lastname@example.org on 2007-05-18 10:35 EST --
Needs more work than I think. You could download temporary solution with
LDAP_DEPRECATED macro before I rewrite affected parts of code.
-- Additional comment from email@example.com on 2007-05-21 09:30 EST --
Could you please test proposed update?
Additionaly some changes have to be done in ldap2zone.c
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
IMHO this is quite poor. While the LDAP_DEPRECATED workaround is not the
cleanest, it works. Other distributions ship a working sdb_ldap (with the
LDAP_DEPRECATED workaround). Almost a year after the bug was filed, the feature
is still broken.
(Sorry, but this bug just ruined a change).
I've built my own packages with LDAP_DEPRECATED defined for my RHEL5 boxes, but
I'm tired of having to rebuild so many things to have a working box ...
It takes some time before fix is available in RHEL (testing etc). Fix is going
to be available in RHEL 5.2 which is scheduled to May 21.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.