unlang idiom for removing superfluous attributes?
I was pondering rewriting my rlm_attr_filter sets as unlang policy. If there is an elegant way in unlang to remove all attributes from a list except the ones you want, I'm having trouble finding it. In unlang you seem to need to know the name of an attribute to do anything to it. If there was a temporary list, one could maybe (not sure if !* ANY works on lists): update { &tmp: !* ANY &tmp: += &reply: &reply: !* ANY } update reply { # add the ones you want back in from &tmp:, perhaps with alterations } ... but so far I only have found the Tmp-* attributes, no temporary list. Maybe this is just one of the cases where we still need rlm_attr_filter? Or maybe someone with more unlang-foo than me knows a magic incantation?
On Jan 20, 2023, at 9:22 PM, Brian Julin <BJulin@clarku.edu> wrote:
I was pondering rewriting my rlm_attr_filter sets as unlang policy.
If there is an elegant way in unlang to remove all attributes from a list except the ones you want, I'm having trouble finding it.
Not really, no.
In unlang you seem to need to know the name of an attribute to do anything to it.
Yes.
If there was a temporary list, one could maybe (not sure if !* ANY works on lists):
session-state? If it's not being used for EAP, then nothing else really uses it.
Maybe this is just one of the cases where we still need rlm_attr_filter?
Mostly, yes.
Or maybe someone with more unlang-foo than me knows a magic incantation?
We're looking into fixing this in v4. But... that (as always) is a work in progress. Alan DeKok.
participants (2)
-
Alan DeKok -
Brian Julin