MINOR/BUG: mworker/cli: do not use the unix_bind prefix for the master CLI socket
authorEric Salama <esalama@haproxy.com>
Tue, 16 Mar 2021 14:12:17 +0000 (15:12 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Thu, 18 Mar 2021 08:08:19 +0000 (09:08 +0100)
commit1b8dacc858d7cb43488fb2ffca053274c571da1d
tree3b7fa70fc20307de67343fca3f446c37ad54db92
parent6f9f2c085791918c31d970b7a36a714032f5b2b1
MINOR/BUG: mworker/cli: do not use the unix_bind prefix for the master CLI socket

If the configuration file contains a 'unix-bind prefix' directive, and
if we use the -S option and specify a UNIX socket path, the path of the
socket will be prepended with the value of the unix-bind prefix.

For instance, if we have 'unix-bind prefix /tmp/sockets/' and we use
'-S /tmp/master-socket' on the command line, we will get this error:

Starting proxy MASTER:
cannot bind UNIX socket (No such file or directory) [/tmp/sockets/tmp/master-socket]

So this patch adds an exception, and will ignore the unix-bind prefix
for the master CLI socket.

This patch can be backported as far as 1.9.
src/cfgparse.c
src/cli.c