]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
relax parser
authorAlan T. DeKok <aland@freeradius.org>
Sat, 24 Aug 2024 13:08:23 +0000 (09:08 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 24 Aug 2024 13:08:23 +0000 (09:08 -0400)
as detail "suppress" uses bare words.

src/lib/server/cf_file.c

index 2e89c4430078eefdaf961b0dfc781231cb94bc12..3c6716f00b272ed777ebb11c8774a6cbbddcf1ce 100644 (file)
@@ -2202,18 +2202,14 @@ check_for_eol:
                 *      Only unlang sections can have module references.
                 *
                 *      We also allow bare words in edit lists, where the RHS is a list of values.
+                *
+                *      @todo - detail "suppress" requires bare words :(
                 */
-               if( (parent->unlang == CF_UNLANG_ALLOW) || (parent->unlang == CF_UNLANG_EDIT)) {
-                       parent->allow_locals = false;
-                       value_token = T_INVALID;
-                       op_token = T_OP_EQ;
-                       value = NULL;
-                       goto alloc_pair;
-               }
-
-               ERROR("%s[%d]: Parse error: Unexpected bare word.  There should be a '{' or operator after it",
-                     frame->filename, frame->lineno);
-               return -1;
+               parent->allow_locals = false;
+               value_token = T_INVALID;
+               op_token = T_OP_EQ;
+               value = NULL;
+               goto alloc_pair;
        }
 
        /*