From f8bf16960e701433572d12f4c888ab271f05f485 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 15 Nov 2007 01:13:24 +0100 Subject: r25958: 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 (This used to be commit eb180f6a6af0caf185e0f9782173c232dab9c5fb) --- source4/lib/gendb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source4/lib/gendb.c b/source4/lib/gendb.c index 003384b1ee..35b55a1fd7 100644 --- a/source4/lib/gendb.c +++ b/source4/lib/gendb.c @@ -64,6 +64,9 @@ int gendb_search_v(struct ldb_context *ldb, 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; -- cgit