From: William Lallemand Date: Thu, 4 Jun 2020 21:49:20 +0000 (+0200) Subject: BUG/MINOR: init: -S can have a parameter starting with a dash X-Git-Tag: v2.2-dev9~151 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a6b3249935cf8e4de53b9940419683ef82cb40b8;p=thirdparty%2Fhaproxy.git BUG/MINOR: init: -S can have a parameter starting with a dash There is no reason the -S option can't take an argument which starts with a -. This limitation must only be used for options that take a non-finite list of parameters (-sf/-st) This can be backported only if the previous patch which fixes copy_argv() is backported too. Could be backported as far as 1.9. --- diff --git a/src/haproxy.c b/src/haproxy.c index ed971a46e4..80cee38ea1 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -1882,7 +1882,7 @@ static void init(int argc, char **argv) else if (*flag == 'S') { struct wordlist *c; - if (argc <= 1 || argv[1][0] == '-') { + if (argc <= 1) { ha_alert("Socket and optional bind parameters expected with the -S flag\n"); usage(progname); }