]> git.sur5r.net Git - openldap/commitdiff
check return code (ITS#6643)
authorPierangelo Masarati <ando@openldap.org>
Wed, 8 Sep 2010 17:31:50 +0000 (17:31 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 8 Sep 2010 17:31:50 +0000 (17:31 +0000)
servers/slapd/back-meta/search.c

index 57cf5015b36764e80e23bea09bcf8a0ed46f2488..2afc0083b0486394908bb45530e805294e6e6402 100644 (file)
@@ -191,8 +191,13 @@ meta_search_dobind_init(
                        ( mt->mt_idassert_flags & LDAP_BACK_AUTH_OVERRIDE ) ) )
        {
                rc = meta_back_proxy_authz_cred( mc, candidate, op, rs, LDAP_BACK_DONTSEND, &binddn, &cred, &method );
-               if ( rc != LDAP_SUCCESS ) {
+               switch ( rc ) {
+               case LDAP_SUCCESS:
+                       break;
+               case LDAP_UNAVAILABLE:
                        goto down;
+               default:
+                       goto other;
                }
 
                /* NOTE: we copy things here, even if bind didn't succeed yet,