[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#6582) API C : freeze of the function "ldap_modify_ext_s"

Full_Name: Philippe EYCHART
Version: last
OS: GNU-Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (


I have done an error in my program (I know, it's bad ;-) but, according to me,
the reponse of the LDAP API C (function: ldap_modify_ext_s) is not appropriate:

I've tried to create a new attribute in an existing LDAPEntry (attribute
"userPassword"), but with  ... no attribute value!

Program trace, stopped on this break point:
-> m_errNo = ldap_modify_ext_s ( m_desc, (*m_entryIn)->getIdentifier().c_str(),
tmpMods, NULL, NULL );
   this->freeMemory ( tmpMods );

At this point, the debugger shows:
Function Arguments
 m_desc = (LDAP *) 0x991820
    ld_errno = 0
    ld_error = 0
 (*(this->m_entryIn))->getIdentifier().c_str() = 0xb92968
    mod_op = 128
    mod_type = 0xa4dc50 "userPassword"
        modv_strvals = 0x0
        modv_bvals = 0x0
 tmpMods[1] = (LDAPMod *) 0x0

So, there is actually (in "LDAPMod*[]" parameter) a null terminated array of
"ldapmod" structures with only one structure defined, a structure where
"mod_vals" is empty ...

Resultat: when this line (m_errNo = ldap_modify_ext_s...) is executed, no error
is returned ; in fact, the program never returns !...

Philippe EYCHART