svn commit: samba r25958 - in branches/SAMBA_4_0/source/lib: .

abartlet at samba.org abartlet at samba.org
Thu Nov 15 01:13:24 GMT 2007


Author: abartlet
Date: 2007-11-15 01:13:24 +0000 (Thu, 15 Nov 2007)
New Revision: 25958

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

Log:
Callers of gendb_search_dn() don't expect to get
LDB_ERR_NO_SUCH_OBJECT for base searches.  Return 0 in this case.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/lib/gendb.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/gendb.c
===================================================================
--- branches/SAMBA_4_0/source/lib/gendb.c	2007-11-15 01:12:10 UTC (rev 25957)
+++ branches/SAMBA_4_0/source/lib/gendb.c	2007-11-15 01:13:24 UTC (rev 25958)
@@ -64,6 +64,9 @@
 		ret = res->count;
 		*msgs = res->msgs;
 		talloc_free(res);
+	} else if (scope == LDB_SCOPE_BASE && ret == LDB_ERR_NO_SUCH_OBJECT) {
+		ret = 0;
+		*msgs = NULL;
 	} else {
 		DEBUG(4,("gendb_search_v: search failed: %s", ldb_errstring(ldb)));
 		ret = -1;



More information about the samba-cvs mailing list