Bug 240788 - bind_sdb, ldap2zone segfaulting
bind_sdb, ldap2zone segfaulting
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: bind (Show other bugs)
5.0
x86_64 Linux
high Severity high
: ---
: ---
Assigned To: Adam Tkac
:
Depends On: 239802
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-21 13:06 EDT by Adam Tkac
Modified: 2013-04-30 19:35 EDT (History)
1 user (show)

See Also:
Fixed In Version: RHSA-2008-0300
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-21 10:17:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Tkac 2007-05-21 13:06:19 EDT
+++ 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@redhat.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 
> compilation.

Better solution is change functions to newer than using deprecated API

Regards, -A-



-- Additional comment from atkac@redhat.com 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@redhat.com 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 07:38:35 EDT
Additionaly some changes have to be done in ldap2zone.c
Comment 2 RHEL Product and Program Management 2007-10-15 23:59:28 EDT
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 16:08:05 EDT
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 18:28:09 EDT
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 10:17:21 EDT
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

Note You need to log in before you can comment on or make changes to this bug.