ctx->cur_map.username_attribute = dict_ldap_commonName;
}
if (ctx->cur_map.scope == NULL) {
- ctx->cur_map.scope_val = 2; /* subtree */
+ ctx->cur_map.parsed_scope = 2; /* subtree */
} else {
- if (strcasecmp(ctx->cur_map.scope, "one") == 0) ctx->cur_map.scope_val = 1;
- else if (strcasecmp(ctx->cur_map.scope, "base") == 0) ctx->cur_map.scope_val = 0;
- else if (strcasecmp(ctx->cur_map.scope, "subtree") == 0) ctx->cur_map.scope_val = 2;
+ if (strcasecmp(ctx->cur_map.scope, "one") == 0) ctx->cur_map.parsed_scope = 1;
+ else if (strcasecmp(ctx->cur_map.scope, "base") == 0) ctx->cur_map.parsed_scope = 0;
+ else if (strcasecmp(ctx->cur_map.scope, "subtree") == 0) ctx->cur_map.parsed_scope = 2;
else return "Scope must be one, base or subtree";
}
if (!array_is_created(&ctx->cur_map.ldap_attributes)) {
/* build lookup */
i_zero(&input);
input.base_dn = map->base;
- input.scope = map->scope_val;
+ input.scope = map->parsed_scope;
if (!ldap_dict_build_query(set, map, &values, strncmp(key, DICT_PATH_PRIVATE, strlen(DICT_PATH_PRIVATE))==0, query, &error)) {
op->res.error = error;
callback(&op->res, context);