]> git.sur5r.net Git - openldap/commitdiff
ITS#6851 replace assert with error msg
authorHoward Chu <hyc@openldap.org>
Fri, 18 Nov 2011 01:31:50 +0000 (17:31 -0800)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 26 Jul 2012 21:19:10 +0000 (14:19 -0700)
servers/slapd/back-ldap/bind.c

index e37d8e7bbeeca084c7ad95703637cdc8e4267cc2..5be6976a544dbefdd07ed6001936f2bb78a54362 100644 (file)
@@ -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;