diff options
author | Torgeir Lerkerød <torgeir.lerkerod@gmail.com> | 2009-10-20 18:33:25 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-10-21 15:46:38 +0200 |
commit | 95ce7dff20d5629eff16cc6f7527c542987d8eb0 (patch) | |
tree | 990e8b5dd63118fbc7ff86248f6ac45303329cbe /source4/lib/ldb/ldb_map/ldb_map_outbound.c | |
parent | 6e5dad49d9cfc8e8a3fc6c1e60733d6e25865ef7 (diff) | |
download | samba-95ce7dff20d5629eff16cc6f7527c542987d8eb0.tar.gz samba-95ce7dff20d5629eff16cc6f7527c542987d8eb0.tar.bz2 samba-95ce7dff20d5629eff16cc6f7527c542987d8eb0.zip |
S4: ldb_map modules uses defines that are reserved
On OpenSolaris MAP_RENAME and friends are defined in <sys/mman.h> e.g. mmap and friends. So on these systems MAP_* have a meaning. Cleaned up LDB name space by adding LDB_ in front of MAP_* e.g. MAP_RENAME => LDB_MAP_RENAME
Signed-off-by: Torgeir Lerkerød <torgeir.lerkerod@gmail.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/lib/ldb/ldb_map/ldb_map_outbound.c')
-rw-r--r-- | source4/lib/ldb/ldb_map/ldb_map_outbound.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/source4/lib/ldb/ldb_map/ldb_map_outbound.c b/source4/lib/ldb/ldb_map/ldb_map_outbound.c index 45caffeeae..922d13991b 100644 --- a/source4/lib/ldb/ldb_map/ldb_map_outbound.c +++ b/source4/lib/ldb/ldb_map/ldb_map_outbound.c @@ -124,19 +124,19 @@ static const char **map_attrs_collect_remote(struct ldb_module *module, void *me } switch (map->type) { - case MAP_IGNORE: + case LDB_MAP_IGNORE: continue; - case MAP_KEEP: + case LDB_MAP_KEEP: name = attrs[i]; goto named; - case MAP_RENAME: - case MAP_CONVERT: + case LDB_MAP_RENAME: + case LDB_MAP_CONVERT: name = map->u.rename.remote_name; goto named; - case MAP_GENERATE: + case LDB_MAP_GENERATE: /* Add all remote names of "generate" attrs */ for (j = 0; map->u.generate.remote_names[j]; j++) { result = talloc_realloc(mem_ctx, result, const char *, last+2); @@ -281,26 +281,26 @@ static int ldb_msg_el_merge(struct ldb_module *module, struct ldb_message *local } switch (map->type) { - case MAP_IGNORE: + case LDB_MAP_IGNORE: break; - case MAP_CONVERT: + case LDB_MAP_CONVERT: remote_name = map->u.convert.remote_name; break; - case MAP_KEEP: + case LDB_MAP_KEEP: remote_name = attr_name; break; - case MAP_RENAME: + case LDB_MAP_RENAME: remote_name = map->u.rename.remote_name; break; - case MAP_GENERATE: + case LDB_MAP_GENERATE: break; } switch (map->type) { - case MAP_IGNORE: + case LDB_MAP_IGNORE: return LDB_SUCCESS; - case MAP_CONVERT: + case LDB_MAP_CONVERT: if (map->u.convert.convert_remote == NULL) { ldb_debug(ldb, LDB_DEBUG_ERROR, "ldb_map: " "Skipping attribute '%s': " @@ -309,8 +309,8 @@ static int ldb_msg_el_merge(struct ldb_module *module, struct ldb_message *local return LDB_SUCCESS; } /* fall through */ - case MAP_KEEP: - case MAP_RENAME: + case LDB_MAP_KEEP: + case LDB_MAP_RENAME: old = ldb_msg_find_element(remote, remote_name); if (old) { el = ldb_msg_el_map_remote(module, local, map, attr_name, old); @@ -319,7 +319,7 @@ static int ldb_msg_el_merge(struct ldb_module *module, struct ldb_message *local } break; - case MAP_GENERATE: + case LDB_MAP_GENERATE: if (map->u.generate.generate_local == NULL) { ldb_debug(ldb, LDB_DEBUG_ERROR, "ldb_map: " "Skipping attribute '%s': " @@ -353,7 +353,7 @@ static int ldb_msg_el_merge_wildcard(struct ldb_module *module, struct ldb_messa int i, ret; /* Perhaps we have a mapping for "*" */ - if (map && map->type == MAP_KEEP) { + if (map && map->type == LDB_MAP_KEEP) { /* We copy everything over, and hope that anything with a more specific rule is overwritten */ for (i = 0; i < remote->num_elements; i++) { @@ -772,7 +772,7 @@ int map_subtree_collect_remote_simple(struct ldb_module *module, void *mem_ctx, } **new = *tree; - if (map->type == MAP_KEEP) { + if (map->type == LDB_MAP_KEEP) { /* Nothing to do here */ return 0; } @@ -814,7 +814,7 @@ int map_subtree_collect_remote_simple(struct ldb_module *module, void *mem_ctx, return 0; } - if (map->type == MAP_RENAME) { + if (map->type == LDB_MAP_RENAME) { /* Nothing more to do here, the attribute has been renamed */ return 0; } @@ -897,7 +897,7 @@ static int map_subtree_collect_remote(struct ldb_module *module, void *mem_ctx, return map->convert_operator(module, mem_ctx, new, tree); } - if (map->type == MAP_GENERATE) { + if (map->type == LDB_MAP_GENERATE) { ldb_debug(ldb, LDB_DEBUG_WARNING, "ldb_map: " "Skipping attribute '%s': " "'convert_operator' not set", |