const char *map_attr_map_remote(void *mem_ctx, const struct ldb_map_attribute *map, const char *attr)
{
	if (map == NULL) {
		return talloc_strdup(mem_ctx, attr);
	}

	if (map->type == LDB_MAP_KEEP) {
		return talloc_strdup(mem_ctx, attr);
	}

	return talloc_strdup(mem_ctx, map->local_name);
}
const char *map_attr_map_remote(void *mem_ctx, const struct ldb_map_attribute *map, const char *attr)
{
	if (map == NULL) {
		return talloc_strdup(mem_ctx, attr);
	}

	if (map->type == LDB_MAP_KEEP) {
		return talloc_strdup(mem_ctx, attr);
	}

	return talloc_strdup(mem_ctx, map->local_name);
}