for (i = 0; i < self->count; i++) {
value_pair_map_t *attr = NULL;
- RDEBUG3("Parsing valuepair string \"%s\"", self->values[i]);
- if (radius_strpair2map(&attr, request, self->values[i],
+ RDEBUG3("Parsing valuepair string \"%s\"", self->values[i]->bv_val);
+ if (radius_strpair2map(&attr, request, self->values[i]->bv_val,
map->dst->vpt_request, map->dst->vpt_list,
REQUEST_CURRENT, PAIR_LIST_REQUEST) < 0) {
- RWDEBUG("Failed parsing \"%s\" as valuepair, skipping...", self->values[i]);
+ RWDEBUG("Failed parsing \"%s\" as valuepair, skipping...", self->values[i]->bv_val);
continue;
}
if (attr->dst->vpt_request != map->dst->vpt_request) {
RWDEBUG("valuepair \"%s\" has conflicting request qualifier (%s vs %s), skipping...",
- self->values[i],
+ self->values[i]->bv_val,
fr_int2str(request_refs, attr->dst->vpt_request, "<INVALID>"),
fr_int2str(request_refs, map->dst->vpt_request, "<INVALID>"));
next_pair:
if ((attr->dst->vpt_list != map->dst->vpt_list)) {
RWDEBUG("valuepair \"%s\" has conflicting list qualifier (%s vs %s), skipping...",
- self->values[i],
+ self->values[i]->bv_val,
fr_int2str(pair_lists, attr->dst->vpt_list, "<INVALID>"),
fr_int2str(pair_lists, map->dst->vpt_list, "<INVALID>"));
goto next_pair;
}
if (radius_map2vp(&vp, request, attr, NULL) < 0) {
- RWDEBUG("Failed creating attribute for \"%s\", skipping...", self->values[i]);
+ RWDEBUG("Failed creating attribute for \"%s\", skipping...", self->values[i]->bv_val);
goto next_pair;
}
vp = pairalloc(request, map->dst->vpt_da);
rad_assert(vp);
- if (!pairparsevalue(vp, self->values[i], 0)) {
+ if (!pairparsevalue(vp, self->values[i]->bv_val, self->values[i]->bv_len)) {
RDEBUG("Failed parsing value for \"%s\"", map->dst->vpt_da->name);
talloc_free(vp);
for (map = expanded->maps; map != NULL; map = map->next) {
name = expanded->attrs[total++];
- result.values = ldap_get_values(handle, entry, name);
+ /*
+ * Binary safe
+ */
+ result.values = ldap_get_values_len(handle, entry, name);
if (!result.values) {
RDEBUG3("Attribute \"%s\" not found in LDAP object", name);
* Find out how many values there are for the
* attribute and extract all of them.
*/
- result.count = ldap_count_values(result.values);
+ result.count = ldap_count_values_len(result.values);
/*
* If something bad happened, just skip, this is probably
next:
- ldap_value_free(result.values);
+ ldap_value_free_len(result.values);
}
/*