BUG/MINOR: unix: better catch situations where the unix socket path length is close...
authorWilly Tarreau <w@1wt.eu>
Tue, 11 Feb 2020 05:43:37 +0000 (06:43 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Feb 2020 05:49:42 +0000 (06:49 +0100)
commit327ea5aec83092404bca09df2fb9aa86118c8a73
treee12522fdcf5f1bb346c8c4f56c886c229d5a32cd
parent508f98975838e8716e6531af8771c4e1ca46d693
BUG/MINOR: unix: better catch situations where the unix socket path length is close to the limit

We do have some checks for the UNIX socket path length to validate the
full pathname of a unix socket but the pathname extension is only taken
into account when using a bind_prefix. The second check only matches
against MAXPATHLEN. So this means that path names between 98 and 108
might successfully parse but fail to bind. Let's adjust the check in
the address parser and refine the error checking at the bind() step.

This addresses bug #493.
src/proto_uxst.c
src/standard.c