From c6518514e47c89f498189f6f51e0199db7e01bb9 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 11 Apr 2007 09:00:17 +0000 Subject: [PATCH] import ITS#4924 from HEAD --- CHANGES | 1 + libraries/libldap/request.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index d59edb6c26..c67c434b85 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ OpenLDAP 2.3 Change Log OpenLDAP 2.3.36 Engineering + Fixed libldap response code handling on rebind (ITS#4924) OpenLDAP 2.3.35 Release (2007/04/09) Fixed ldapmodify to use correct memory free functions (ITS#4901) diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index 67dbd15e29..70145a812b 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -424,7 +424,10 @@ ldap_new_connection( LDAP *ld, LDAPURLDesc *srvlist, int use_ldsb, ++lc->lconn_refcnt; /* avoid premature free */ ld->ld_defconn = lc; - Debug( LDAP_DEBUG_TRACE, "anonymous rebind via ldap_bind_s\n", 0, 0, 0); + Debug( LDAP_DEBUG_TRACE, + "anonymous rebind via ldap_sasl_bind(\"\")\n", + 0, 0, 0); + #ifdef LDAP_R_COMPILE ldap_pvt_thread_mutex_unlock( &ld->ld_req_mutex ); ldap_pvt_thread_mutex_unlock( &ld->ld_res_mutex ); @@ -462,7 +465,13 @@ ldap_new_connection( LDAP *ld, LDAPURLDesc *srvlist, int use_ldsb, break; default: - assert( 0 ); + Debug( LDAP_DEBUG_TRACE, + "ldap_new_connection %p: " + "unexpected response %d " + "from BIND request id=%d\n", + ld, ldap_msgtype( res ), msgid ); + err = -1; + break; } } } -- 2.47.2