summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/modules
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-11-16 09:55:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:16 -0500
commite4955030bc70d1afd46fbfcd802d3d85d69be8f9 (patch)
tree211029ffbad00d2a962417df04e9ce8d88faab34 /source4/lib/ldb/modules
parent84138215cade4bd427a4a04810696cbb89434928 (diff)
downloadsamba-e4955030bc70d1afd46fbfcd802d3d85d69be8f9.tar.gz
samba-e4955030bc70d1afd46fbfcd802d3d85d69be8f9.tar.bz2
samba-e4955030bc70d1afd46fbfcd802d3d85d69be8f9.zip
r19733: More work to fix ldb_map. With the wildcard present,
map_attr_find_local() always returns, which is exactly what we don't want. Instead, rely on the overwrite behaviour. Andrew Bartlett (This used to be commit 9b9b7bae16a635d9a9ba72d21a4a4718d294c9b0)
Diffstat (limited to 'source4/lib/ldb/modules')
-rw-r--r--source4/lib/ldb/modules/ldb_map_outbound.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/source4/lib/ldb/modules/ldb_map_outbound.c b/source4/lib/ldb/modules/ldb_map_outbound.c
index 505df79533..6305e6666f 100644
--- a/source4/lib/ldb/modules/ldb_map_outbound.c
+++ b/source4/lib/ldb/modules/ldb_map_outbound.c
@@ -348,12 +348,8 @@ static int ldb_msg_el_merge_wildcard(struct ldb_module *module, struct ldb_messa
/* Perhaps we have a mapping for "*" */
if (map && map->type == MAP_KEEP) {
/* We copy everything over, and hope that anything with a
- more specific rule is overwritten, or caught by the test below */
+ more specific rule is overwritten */
for (i = 0; i < remote->num_elements; i++) {
- if (map_attr_find_local(data, remote->elements[i].name)) {
- /* The name this would have been copied to has a more specific mapping */
- continue;
- }
el = ldb_msg_el_map_remote(module, local, map, remote->elements[i].name,
&remote->elements[i]);
if (el == NULL) {
@@ -1039,7 +1035,7 @@ int map_up_callback(struct ldb_context *ldb, const struct ldb_request *req, stru
/* Limit result to requested attrs */
if ((req->op.search.attrs) && (!ldb_attr_in_list(req->op.search.attrs, "*"))) {
for (i = 0; i < ares->message->num_elements; ) {
- const struct ldb_message_element *el = &ares->message->elements[i];
+ struct ldb_message_element *el = &ares->message->elements[i];
if (!ldb_attr_in_list(req->op.search.attrs, el->name)) {
ldb_msg_remove_element(ares->message, el);
} else {