andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
Blob Blame History Raw
From 7afea3c29faea062f06ee97cd71496a8f7d5765c Mon Sep 17 00:00:00 2001
From: Noriko Hosoi <nhosoi@redhat.com>
Date: Tue, 23 Sep 2014 15:22:11 -0700
Subject: [PATCH 269/305] Ticket #47907 - ldclt: assertion failure with -e
 "add,counteach" -e "object=<ldif file>,rdn=uid:test[A=INCRNNOLOOP(0;24

Bug Description: In case createMissingNodes is called from doAddEntry,
LDAP handle is unbound which makes the following operation such as
ldap_add fail since the handle is already released.

Fix Description: Rempoving ldap_unbind_ext from createMissingNodes.

Reviewed by rmeggins@redhat.com (Thank you, Rich!!)

https://fedorahosted.org/389/ticket/47907
(cherry picked from commit 685607f63d52d54e8bd094bb0694986484a91e34)
(cherry picked from commit 906106b6778fc1cddf49b109765b1d6b4753eab9)
(cherry picked from commit 8c955b1709c041687d981a8a77dde020a4860dc5)
(cherry picked from commit dd62c7582608298297ee104374b88c5d5398e790)
---
 ldap/servers/slapd/tools/ldclt/ldapfct.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/ldap/servers/slapd/tools/ldclt/ldapfct.c b/ldap/servers/slapd/tools/ldclt/ldapfct.c
index b177d7c..8fd3304 100644
--- a/ldap/servers/slapd/tools/ldclt/ldapfct.c
+++ b/ldap/servers/slapd/tools/ldclt/ldapfct.c
@@ -2308,17 +2308,6 @@ createMissingNodes (
   if (freeAttrib (attrs) < 0)
     return (-1);
 
-  ret = ldap_unbind_ext (cnx, NULL, NULL);
-  if (ret != LDAP_SUCCESS)
-  {
-    fprintf (stderr, "ldclt[%d]: T%03d: cannot ldap_unbind(), error=%d (%s)\n",
-			mctx.pid, tttctx->thrdNum, ret, strerror (ret));
-    fflush (stderr);
-    if (addErrorStat (ret) < 0)
-      return (-1);
-    return (-1);
-  }
-
   /*
    * Ouf ! End of this function.
    */
-- 
1.9.3