From: Nick Porter Date: Fri, 22 Sep 2023 15:13:40 +0000 (+0100) Subject: Use map_to_request in place of map_to_vp to handle nested attributes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4783d137f45f14ef5064707bdc51bbe2d0305a4;p=thirdparty%2Ffreeradius-server.git Use map_to_request in place of map_to_vp to handle nested attributes This allows for nested attributes to be handled in the rlm_ldap module update map such that update { &control += "radiusControlAttribute" } with a directory entry containting radiusControlAttribute: Vendor-Specific.Cisco.AVPair += 'foo=bar' will result in the correct nested structure being built. --- diff --git a/src/lib/ldap/map.c b/src/lib/ldap/map.c index 0a544594b83..3467e49cc6a 100644 --- a/src/lib/ldap/map.c +++ b/src/lib/ldap/map.c @@ -141,13 +141,12 @@ int fr_ldap_map_getvalue(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *reques goto next_pair; } - if (map_to_vp(ctx, &tmp_list, request, attr, NULL) < 0) { + if (map_to_request(request, attr, map_to_vp, NULL) < 0) { RWDEBUG("Failed creating attribute for valuepair \"%pV\", skipping...", fr_box_strvalue_len(self->values[i]->bv_val, self->values[i]->bv_len)); goto next_pair; } - fr_pair_list_append(&head, &tmp_list); talloc_free(attr); /*