Print out error for non-server "authorize" etc. sections
authorAlan T. DeKok <aland@freeradius.org>
Mon, 9 Feb 2015 20:50:54 +0000 (15:50 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 9 Feb 2015 20:51:16 +0000 (15:51 -0500)
src/main/modules.c

index 51be2b9..10b939d 100644 (file)
@@ -1150,6 +1150,11 @@ static int load_byserver(CONF_SECTION *cs)
                                            section_type_value[comp].section);
                if (!subcs) continue;
 
+               if (!name) {
+                       cf_log_err_cs(subcs, "The %s section should be inside of a 'server { ... }' block!",
+                                     section_type_value[comp].section);
+               }
+
                if (cf_item_find_next(subcs, NULL) == NULL) continue;
 
                /*