summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-11-15 01:13:24 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:45:18 +0100
commitf8bf16960e701433572d12f4c888ab271f05f485 (patch)
tree13220a81b5294502702561ad3d6db4933a946d49 /source4/lib
parent3f7dcaceba0adbc4a436780bad776255425bf1b2 (diff)
downloadsamba-f8bf16960e701433572d12f4c888ab271f05f485.tar.gz
samba-f8bf16960e701433572d12f4c888ab271f05f485.tar.bz2
samba-f8bf16960e701433572d12f4c888ab271f05f485.zip
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)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/gendb.c3
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;