]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't treat exec as xlat
authorAlan T. DeKok <aland@freeradius.org>
Wed, 1 Jun 2022 19:59:33 +0000 (15:59 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 3 Jun 2022 11:15:58 +0000 (07:15 -0400)
src/lib/unlang/xlat_expr.c

index b0adcef4c5468d5e31846c5c95727e9688ee6ca2..994a624166ae8eb2279dda3240404e9f7c77b2b0 100644 (file)
@@ -1634,9 +1634,9 @@ static ssize_t tokenize_field(xlat_exp_head_t *head, xlat_exp_t **out, fr_sbuff_
 
        /*
         *      Don't keep an intermediate tmpl for xlats.  Just hoist
-        *      the xlat to be a child of this node.
+        *      the xlat to be a child of this node, unless it's an exec.
         */
-       if (tmpl_contains_xlat(node->vpt)) {
+       if (tmpl_contains_xlat(node->vpt) && !tmpl_is_exec(node->vpt)) {
                xlat_exp_head_t *xlat = tmpl_xlat(node->vpt);
 
                talloc_steal(node, xlat);