]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: vars: do not talk about global section in CLI errors for set-var
authorWilly Tarreau <w@1wt.eu>
Fri, 3 Sep 2021 08:23:26 +0000 (10:23 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 3 Sep 2021 09:01:12 +0000 (11:01 +0200)
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.

src/vars.c

index e4e547afd2d1cae7d56b0817ea7ba1a9db135d71..59f802a30890c527726e0e202783f0698da48a0e 100644 (file)
@@ -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;
        }