From: Willy Tarreau Date: Wed, 20 May 2026 09:30:32 +0000 (+0200) Subject: MEDIUM: startup: warn when chroot is not set for root X-Git-Tag: v3.4-dev13~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b9acb4415f36a109523e3af4925dfa3589d376ed;p=thirdparty%2Fhaproxy.git MEDIUM: startup: warn when chroot is not set for root We're still regularly seeing insecure configs where chroot is missing. Now that we have "chroot auto", there's no excuse for not knowing where to chroot, so let's detect that we're starting as root, detect that the process is allowed to chroot (i.e. no capability issue, or some hardened containers), and if no chroot is set, let's emit a warning explaining how to silence it, i.e. either "chroot auto" or "chroot /". Most likely we'll start using "chroot auto" by default in 3.5 if no usability issue is reported. --- diff --git a/doc/configuration.txt b/doc/configuration.txt index 7f4f927fe..6139d19a8 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -2142,6 +2142,13 @@ chroot { | auto } The resulting jail has no name in the filesystem and is empty and read-only, removing the need to prepare a dedicated jail directory. + When starting with superuser privileges, a warning will be displayed if no + chroot is used, in order to encourage users to always use the mechanism. If + for any reason there is a compelling reason not to use chroot (e.g. access to + a server via a UNIX socket with an unconvenient path), it remains possible to + silence the warning by adding an explicit "chroot /", which has the benefit + of being visible in a configuration. + close-spread-time