summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_map
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-08-30 00:41:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:58 -0500
commit7be4cf8c1ded42daf7e86ecd2c0dbfeeed312b22 (patch)
tree31b40e747ae679f4d6eeef2f8b3999070c747ea6 /source4/lib/ldb/ldb_map
parent37194224416d7509a457ee4aa18991b8bab0da7d (diff)
downloadsamba-7be4cf8c1ded42daf7e86ecd2c0dbfeeed312b22.tar.gz
samba-7be4cf8c1ded42daf7e86ecd2c0dbfeeed312b22.tar.bz2
samba-7be4cf8c1ded42daf7e86ecd2c0dbfeeed312b22.zip
r9770: Couple other bugfixes
Update TODO-list (This used to be commit d9541535e3f9e1c058410eeb0a54d60181572f2b)
Diffstat (limited to 'source4/lib/ldb/ldb_map')
-rw-r--r--source4/lib/ldb/ldb_map/ldb_map.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/source4/lib/ldb/ldb_map/ldb_map.c b/source4/lib/ldb/ldb_map/ldb_map.c
index f68ba3d545..7a620f3b81 100644
--- a/source4/lib/ldb/ldb_map/ldb_map.c
+++ b/source4/lib/ldb/ldb_map/ldb_map.c
@@ -754,12 +754,17 @@ static int map_search_bytree_mp(struct ldb_module *module, const struct ldb_dn *
talloc_free(new_tree);
talloc_free(newattrs);
+ if (mpret == -1) {
+ struct map_private *map_private = module->private_data;
+ map_private->last_err_string = ldb_errstring(privdat->mapped_ldb);
+ return -1;
+ }
+
/*
- - per returned record, search local one for additional data (by dn)
+ - per returned record, search fallback database for additional data (by dn)
- test if (full expression) is now true
*/
-
*res = talloc_array(module, struct ldb_message *, mpret);
ret = 0;
@@ -775,7 +780,7 @@ static int map_search_bytree_mp(struct ldb_module *module, const struct ldb_dn *
if (extraret == -1) {
ldb_debug(module->ldb, LDB_DEBUG_ERROR, "Error searching for extra data!\n");
} else if (extraret > 1) {
- ldb_debug(module->ldb, LDB_DEBUG_ERROR, "More then one result for extra data!\n");
+ ldb_debug(module->ldb, LDB_DEBUG_ERROR, "More than one result for extra data!\n");
talloc_free(newres);
return -1;
} else if (extraret == 0) {
@@ -820,12 +825,13 @@ static int map_search_bytree(struct ldb_module *module, const struct ldb_dn *bas
int ret_fb, ret_mp;
ret_fb = map_search_bytree_fb(module, base, scope, tree, attrs, &fbres);
- if (ret_fb == -1)
+ if (ret_fb == -1)
return -1;
ret_mp = map_search_bytree_mp(module, base, scope, tree, attrs, &mpres);
- if (ret_mp == -1)
+ if (ret_mp == -1) {
return -1;
+ }
/* Merge results */
*res = talloc_array(module, struct ldb_message *, ret_fb + ret_mp);