From: Willy Tarreau Date: Fri, 3 Sep 2021 08:23:26 +0000 (+0200) Subject: BUG/MINOR: vars: do not talk about global section in CLI errors for set-var X-Git-Tag: v2.5-dev6~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c767eebf1f2130447cef3269f4a46ed164410a75;p=thirdparty%2Fhaproxy.git BUG/MINOR: vars: do not talk about global section in CLI errors for set-var When attempting to set a variable does not start with the "proc" scope on the CLI, we used to emit "only proc is permitted in the global section" which obviously is a leftover from the initial code. This may be backported to 2.4. --- diff --git a/src/vars.c b/src/vars.c index e4e547afd2..59f802a308 100644 --- a/src/vars.c +++ b/src/vars.c @@ -1039,7 +1039,7 @@ static int vars_parse_cli_set_var(char **args, char *payload, struct appctx *app goto fail; if (rule.arg.vars.scope != SCOPE_PROC) { - memprintf(&err, "'%s %s': cannot set variable '%s', only scope 'proc' is permitted in the global section.", args[0], args[1], args[2]); + memprintf(&err, "'%s %s': cannot set variable '%s', only scope 'proc' is permitted here.", args[0], args[1], args[2]); goto fail; }