From dfad4396ffa9d47dc9effb832f05f1b9f7c36582 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Tue, 12 Feb 2013 16:35:51 +0100 Subject: [PATCH] ipa-kdb: fix retry logic in ipadb_deref_search This function retried an LDAP search when the result was OK due to flawed logic of retry detection (ipadb_need_retry function which returns true when we need retry and not 0). https://fedorahosted.org/freeipa/ticket/3413 --- daemons/ipa-kdb/ipa_kdb_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemons/ipa-kdb/ipa_kdb_common.c b/daemons/ipa-kdb/ipa_kdb_common.c index 121b8096d..e227602ea 100644 --- a/daemons/ipa-kdb/ipa_kdb_common.c +++ b/daemons/ipa-kdb/ipa_kdb_common.c @@ -325,7 +325,7 @@ krb5_error_code ipadb_deref_search(struct ipadb_context *ipactx, ctrl, NULL, &std_timeout, LDAP_NO_LIMIT, res); - retry = !ipadb_need_retry(ipactx, ret) && times > 0; + retry = ipadb_need_retry(ipactx, ret) && times > 0; if (retry) { /* Free result before next try */