Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 240788

Summary: bind_sdb, ldap2zone segfaulting
Product: Red Hat Enterprise Linux 5 Reporter: Adam Tkac <atkac>
Component: bindAssignee: Adam Tkac <atkac>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 5.0CC: ovasik
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: RHSA-2008-0300 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 14:17:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 239802    
Bug Blocks:    

Description Adam Tkac 2007-05-21 17:06:19 UTC
+++ This bug was initially created as a clone of Bug #239802 +++

Description:
bind_sdb and ldap2zone segfaulting when using ldap.

Version-Release number of selected component (if applicable):
bind-sdb-9.3.4-4.fc6

Additional info:
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 
compilation.

#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/usr/src/redhat/BUILD/bind-9.3.4/lib/lwres/include
-I../../lib/lwres/unix/include -I../../lib/lwres/include
-I/usr/src/redhat/BUILD/bind-9.3.4/lib/dns/include -I../../lib/dns/include
-I/usr/src/redhat/BUILD/bind-9.3.4/lib/bind9/include -I../../lib/bind9/include
-I/usr/src/redhat/BUILD/bind-9.3.4/lib/isccfg/include -I../../lib/isccfg/include
-I/usr/src/redhat/BUILD/bind-9.3.4/lib/isccc/include -I../../lib/isccc/include
-I/usr/src/redhat/BUILD/bind-9.3.4/lib/isc/include -I../../lib/isc
-I../../lib/isc/include -I../../lib/isc/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
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 atkac on 2007-05-11 11:39 EST --
(In reply to comment #0)
> finishes ok but binaries are broken. LDAP_DEPRECATED should be defined during 
> compilation.

Better solution is change functions to newer than using deprecated API

Regards, -A-



-- Additional comment from atkac 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.
http://people.redhat.com/atkac/test_srpms/bind-9.3.4-4.5.fc6.src.rpm

-A-

-- Additional comment from atkac on 2007-05-21 09:30 EST --
Could you please test proposed update?
http://people.redhat.com/atkac/test_srpms/bind-9.4.1-2.1.fc8.src.rpm

Thanks, -A-

Comment 1 Adam Tkac 2007-07-25 11:38:35 UTC
Additionaly some changes have to be done in ldap2zone.c

Comment 2 RHEL Program Management 2007-10-16 03:59:28 UTC
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
release.

Comment 8 Buchan Milne 2008-04-29 20:08:05 UTC
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 ...

Comment 9 Adam Tkac 2008-04-29 22:28:09 UTC
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.

Comment 10 errata-xmlrpc 2008-05-21 14:17:21 UTC
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.

http://rhn.redhat.com/errata/RHSA-2008-0300.html