From 00efc1c507d46df9293df1e7433f5b5f1cea9fad Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 8 Sep 2010 17:31:50 +0000 Subject: [PATCH] check return code (ITS#6643) --- servers/slapd/back-meta/search.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 57cf5015b3..2afc0083b0 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -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, -- 2.39.5