]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
just resolve any unresolved tmpls
authorAlan T. DeKok <aland@freeradius.org>
Wed, 20 Jul 2022 23:55:42 +0000 (19:55 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 20 Jul 2022 23:55:42 +0000 (19:55 -0400)
all of the code paths were the same, and the bare unresolved
data tmpls weren't resolved.

src/lib/unlang/compile.c

index 00941b0c6f956abf0c5387b13a421d2235b188fe..7f048ee625da8a51ed2d6671c8ba4cf3cf7de8f8 100644 (file)
@@ -574,25 +574,9 @@ static bool pass2_fixup_map(map_t *map, tmpl_rules_t const *rules, fr_dict_attr_
        }
 
        if (map->rhs) {
-               if (tmpl_is_xlat_unresolved(map->rhs)) {
-                       fr_assert(tmpl_xlat(map->rhs) == NULL);
+               if (tmpl_is_unresolved(map->rhs)) {
+                       fr_assert(!tmpl_is_regex_xlat_unresolved(map->rhs));
 
-                       /*
-                        *      FIXME: compile to attribute && handle
-                        *      the conversion in map_to_vp().
-                        */
-                       if (!pass2_fixup_tmpl(map, &map->rhs, map->ci, rules->attr.dict_def)) {
-                               return false;
-                       }
-               }
-
-               fr_assert(!tmpl_is_regex_xlat_unresolved(map->rhs));
-
-               if (tmpl_is_attr_unresolved(map->rhs)) {
-                       if (!pass2_fixup_tmpl(map, &map->rhs, map->ci, rules->attr.dict_def)) return false;
-               }
-
-               if (tmpl_is_exec(map->rhs)) {
                        if (!pass2_fixup_tmpl(map, &map->rhs, map->ci, rules->attr.dict_def)) {
                                return false;
                        }