summaryrefslogtreecommitdiff
path: root/conf/cf-lex.l
diff options
context:
space:
mode:
Diffstat (limited to 'conf/cf-lex.l')
-rw-r--r--conf/cf-lex.l5
1 files changed, 5 insertions, 0 deletions
diff --git a/conf/cf-lex.l b/conf/cf-lex.l
index 95237215..8dc0ac89 100644
--- a/conf/cf-lex.l
+++ b/conf/cf-lex.l
@@ -559,6 +559,9 @@ static inline void cf_swap_soft_scope(struct config *conf);
static struct symbol *
cf_new_symbol(struct sym_scope *scope, pool *p, struct linpool *lp, const byte *c)
{
+ if (scope->readonly)
+ cf_error("Unknown symbol %s", c);
+
struct symbol *s;
uint l = strlen(c);
@@ -712,6 +715,8 @@ cf_lex_init(int is_cli, struct config *c)
sym->class = SYM_KEYWORD;
sym->keyword = k;
}
+
+ global_root_scope->readonly = 1;
}
ifs_head = ifs = push_ifs(NULL);