]> git.kaiwu.me - haproxy.git/commit
MAJOR: startup: use chroot auto by default when available
authorWilly Tarreau <w@1wt.eu>
Wed, 9 Sep 2026 07:28:34 +0000 (09:28 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 10 Sep 2026 07:02:59 +0000 (09:02 +0200)
commit79082c7c2b7a721587fdc08347a4cb17dfe37fd6
treedcf169c15d42ff64dab61563917c06de7ce45076
parent7be73f6758cdef48d214cf79dc5b8b9ec4c8cfee
MAJOR: startup: use chroot auto by default when available

3.4 implemented "chroot auto", "chroot /", unprivileged chroot and a
warning for super-user when chroot is not used. We were not doing it
for unprivileged users because this would have caused confusion with
configs triggering warnings only on certain OSes or environments.
Now's time to switch to automatic chroot attempt on startup whenever
deemed possible.

For this, we reuse the previous rules to decide to emit a warning when
a chroot is possible but not done, and instead of complaining that no
chroot is done, we just attempt it before emitting the warning only in
case of failure.

This is marked major because it may break some old rare configs that
were emitting the warning in 3.4 due to the lack of chroot, when the
user expected to access for example a UNIX socket at run time, or
using an external check. The fix remains easy (and is explained in
the warning), just use "chroot /".

The change aims at increasing the default security level for users by
default (i.e. with the least config settings), but it's not critical,
so feedback will determine if we keep it as-is, if we adjust it, or if
we revert it.
doc/configuration.txt
src/haproxy.c