diff options
-rw-r--r-- | source4/lib/gendb.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |