[Date Prev][Date Next]
Re: Bad assertion in getdn.c for libldap (ITS#2338)
--On Friday, February 28, 2003 16:36:37 +0100 Pierangelo Masarati
>> Full_Name: Quanah Gibson-Mount
>> Version: 2.1.13
>> OS: Solaris
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (220.127.116.11)
>> In evaluating a script that had run fine when using Net::LDAPapi
>> compiled against the old Netscape libraries with Symas' Net::LDAPapi &
>> OpenLDAP libraries from 2.1.13, I found that it now fails due to a
>> failed assertion in getdn.c for libldap at line 93.
>> The script simply makes an anonymous bind to our Netscape directory
>> servers & does a query on the cn=monitor piece. It gets as far as
>> performing the search before returning the error:
>> perl ldap.monitor directory1.stanford.edu
>> getdn.c:93: failed assertion `ld != NULL'
> the assert is in
> int ldap_get_dn(LDAP *ld, LDAPMessage *entry)
> which must be called with a valid ld (e.g. pointing
> at the connection that returned entry); apparently
> this is not happening, so your client may be hosed.
> From IETF draft "C LDAP Application Program Interface":
> ldap_get_dn() will return NULL if there is some error parsing the dn,
> setting error parameters in the session handle ld to indicate the error.
> It returns a pointer to newly allocated space that the caller SHOULD
> free by calling ldap_memfree() when it is no longer in use. Note the
> format of the DNs returned is given by . The root DN is returned as
> a zero length string ("").
> Apparently, since the function must be able to set the error
> parameters in the session handle, if required, then ld must be
A) My client isn't hosed, it is up and working just fine.
B) I will emphasize again, this script works just fine as long as I do not
use the openldap libraries. I don't see any reason in the script at this
time for the assertion to be coming back as NULL. I will re-evaulate with
Symas however, to verify it is not the Net::LDAPapi module.
Senior Systems Administrator