From: Alan T. DeKok Date: Tue, 22 Aug 2023 19:55:01 +0000 (-0400) Subject: warn on not removing immutable attribute X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bdc531834b39326cf0129a8ffcb95566756ec54;p=thirdparty%2Ffreeradius-server.git warn on not removing immutable attribute --- diff --git a/src/lib/unlang/edit.c b/src/lib/unlang/edit.c index c1bde652ad1..f6cff529212 100644 --- a/src/lib/unlang/edit.c +++ b/src/lib/unlang/edit.c @@ -365,7 +365,14 @@ static int apply_edits_to_list(request_t *request, unlang_frame_state_edit_t *st list = fr_pair_parent_list(vp); fr_assert(list != NULL); - if (fr_pair_immutable(vp)) continue; + /* + * @todo - if this attribute is structural, then remove all children which aren't + * immutable. For now, this is good enough. + */ + if (fr_pair_immutable(vp)) { + RWDEBUG("Not removing immitable %pP", vp); + continue; + } if (fr_edit_list_pair_delete(current->el, list, vp) < 0) { tmpl_dcursor_clear(&cc);