From: Willy Tarreau Date: Wed, 30 Sep 2026 11:39:32 +0000 (+0200) Subject: BUG/MINOR: startup: don't chroot by default when set-dumpable is set X-Git-Tag: v3.5-dev8~88 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=4702b17c1a038dbd05f56dcf39f43f8c8058e0d1;p=haproxy.git BUG/MINOR: startup: don't chroot by default when set-dumpable is set In 3.5-dev7, the automatic chroot by default was applied with commit 79082c7c2b ("MAJOR: startup: use chroot auto by default when available"), but it has the undesired effect to prevent us from getting a core dump by default, even when set-dumpable is set. Let's make sure set-dumpable disables this mechanism and document it. This is cleaner than entering a "chroot /" because set-dumpable is clearly identified as a debugging option that should be left commented out after use. Note: maybe we'll need to add a "chroot /" to all reg-tests now, as it is no longer possible to get a core dumped by default, or we may also use a command-line option to enforce set-dumpable. No backport is needed. --- diff --git a/doc/configuration.txt b/doc/configuration.txt index 7c5299963..beb11b2ce 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -2157,13 +2157,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 sufficient privileges, haproxy will automatically apply - "chroot auto" if no "chroot" directive is used, i.e. it will isolate itself - in a chroot jail, and will emit a warning if it fails to do so. If there is - a compelling reason not to use chroot (e.g. access to a server via a UNIX - socket outside of the jail), it remains possible to silence the warning by - adding an explicit "chroot /", which has the benefit of being visible in a - configuration. + When starting with sufficient privileges and when "set-dumpable" is not set, + haproxy will automatically apply "chroot auto" if no "chroot" directive is + used, i.e. it will isolate itself in a chroot jail, and will emit a warning + if it fails to do so. If there is a compelling reason not to use chroot (e.g. + access to a server via a UNIX socket outside of the jail), 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