svn commit: samba r19733 - in
branches/SAMBA_4_0/source/lib/ldb/modules: .
abartlet at samba.org
abartlet at samba.org
Thu Nov 16 09:55:59 GMT 2006
Author: abartlet
Date: 2006-11-16 09:55:58 +0000 (Thu, 16 Nov 2006)
New Revision: 19733
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19733
Log:
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
Modified:
branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c 2006-11-16 09:34:19 UTC (rev 19732)
+++ branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c 2006-11-16 09:55:58 UTC (rev 19733)
@@ -348,12 +348,8 @@
/* 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 @@
/* 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 {
More information about the samba-cvs
mailing list