From: Howard Chu Date: Fri, 18 Nov 2011 01:31:50 +0000 (-0800) Subject: ITS#6851 replace assert with error msg X-Git-Tag: OPENLDAP_REL_ENG_2_4_32~42 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=509519a72b4ce817678f35bd8a800fe6884da060;p=openldap ITS#6851 replace assert with error msg --- diff --git a/servers/slapd/back-ldap/bind.c b/servers/slapd/back-ldap/bind.c index e37d8e7bbe..5be6976a54 100644 --- a/servers/slapd/back-ldap/bind.c +++ b/servers/slapd/back-ldap/bind.c @@ -1401,7 +1401,17 @@ retry_lock:; /* if we got here, it shouldn't return result */ rc = ldap_back_is_proxy_authz( op, rs, LDAP_BACK_DONTSEND, &binddn, &bindcred ); - assert( rc == 1 ); + if ( rc != 1 ) { + Debug( LDAP_DEBUG_ANY, "Error: ldap_back_is_proxy_authz " + "returned %d, misconfigured URI?\n", rc, 0, 0 ); + rs->sr_err = LDAP_OTHER; + rs->sr_text = "misconfigured URI?"; + LDAP_BACK_CONN_ISBOUND_CLEAR( lc ); + if ( sendok & LDAP_BACK_SENDERR ) { + send_ldap_result( op, rs ); + } + goto done; + } } rc = ldap_back_proxy_authz_bind( lc, op, rs, sendok, &binddn, &bindcred ); goto done;