]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
'actions' must be the LAST thing in a group
authorAlan T. DeKok <aland@freeradius.org>
Wed, 13 Sep 2017 17:47:01 +0000 (13:47 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 13 Sep 2017 17:47:01 +0000 (13:47 -0400)
src/main/unlang_compile.c

index 0d0cb71169fca9ef8989b5ee494b7e356979075a..674e819b462f990d3dce683cec7c521e2c49921f 100644 (file)
@@ -1699,6 +1699,12 @@ static unlang_t *compile_children(unlang_group_t *g, UNUSED unlang_t *parent, un
                         */
                        name1 = cf_section_name1(subcs);
                        if (strcmp(name1, "actions") == 0) {
+                               if (cf_item_next(g->cs, ci) != NULL) {
+                                       cf_log_err(subcs, "'actions' MUST be the last thing in a subsection");
+                                       talloc_free(c);
+                                       return NULL;
+                               }
+
                                if (!compile_action_subsection(c, g->cs, subcs)) {
                                        talloc_free(c);
                                        return NULL;