]> git.sur5r.net Git - openldap/commitdiff
import ITS#4924 from HEAD
authorPierangelo Masarati <ando@openldap.org>
Wed, 11 Apr 2007 09:00:17 +0000 (09:00 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 11 Apr 2007 09:00:17 +0000 (09:00 +0000)
CHANGES
libraries/libldap/request.c

diff --git a/CHANGES b/CHANGES
index d59edb6c26b5079c884b923d6655f8252da05681..c67c434b8520da5634712d98b8a411362c04c8e7 100644 (file)
--- 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)
index 67dbd15e294a307f7d3b6d6b3712ee13725a965f..70145a812ba28abb107db50aeda01d3853aadda1 100644 (file)
@@ -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;
                                        }
                                }
                        }