svn commit: samba r15964 - in branches/SAMBA_4_0/source/lib/ldb/ldb_ildap: .

metze at samba.org metze at samba.org
Tue May 30 19:41:35 GMT 2006


Author: metze
Date: 2006-05-30 19:41:29 +0000 (Tue, 30 May 2006)
New Revision: 15964

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15964

Log:
fix error handling in ldb_ildap backend

metze
Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c	2006-05-30 19:09:34 UTC (rev 15963)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c	2006-05-30 19:41:29 UTC (rev 15964)
@@ -696,7 +696,7 @@
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 	
-	return LDB_SUCCESS;
+	return handle->status;
 }
 
 static int ildb_rootdse_callback(struct ldb_context *ldb, void *context, struct ldb_async_result *ares)
@@ -710,14 +710,21 @@
 
 	ildb = talloc_get_type(context, struct ildb_private);
 
-	if (ildb->rootDSE != NULL) {
-		/* what ? more than one rootdse entry ?! */
+	/* we are interested only in the single reply (rootdse) we receive here */
+	switch (ares->type) {
+	case LDB_REPLY_ENTRY:
+		if (ildb->rootDSE != NULL) {
+			/* what ? more than one rootdse entry ?! */
+			goto error;
+		}
+		ildb->rootDSE = talloc_steal(ildb, ares->message);
+		break;
+
+	case LDB_REPLY_REFERRAL:
 		goto error;
-	}
 
-	/* we are interested only in the single reply (rootdse) we receive here */
-	if (ares->type == LDB_REPLY_ENTRY) {
-		ildb->rootDSE = talloc_steal(ildb, ares->message);
+	case LDB_REPLY_DONE:
+		break;
 	}
 	
 	talloc_free(ares);



More information about the samba-cvs mailing list