]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
maps cannot have local variables
authorAlan T. DeKok <aland@freeradius.org>
Wed, 20 Sep 2023 21:05:03 +0000 (17:05 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 23 Sep 2023 11:57:15 +0000 (07:57 -0400)
because the underlying map doesn't deal well with them :(

src/lib/server/map.c

index 81e311c1dc32732d88727f465e54c64adbf71926..b778d52a179f2492afc82efead4bd8e6ea2e1f1b 100644 (file)
@@ -957,6 +957,12 @@ do_children:
                        goto error;
                }
 
+               if (tmpl_is_attr(map->lhs) && tmpl_attr_tail_da(map->lhs)->flags.local) {
+                       cf_log_err(ci, "Invalid location for local attribute '%s'", map->lhs->name);
+                       talloc_free(map);
+                       goto error; /* re-do "goto marker" stuff to print out spaces ? */
+               }
+
                MAP_VERIFY(map);
 
                /*