]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEIDUM: startup: return to initial cwd only after check_config_validity()
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Tue, 4 Mar 2025 10:04:01 +0000 (11:04 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 6 Mar 2025 09:49:48 +0000 (10:49 +0100)
commite900ef987e4167cf0921e97b09059d757f2c0ea5
treec64fa865e18b2fc7c804f772ecba96209a1a1dff
parentf98b5c4f59695a538cffe951ba222f54a1d7f6d6
BUG/MEIDUM: startup: return to initial cwd only after check_config_validity()

In check_config_validity() we evaluate some sample fetch expressions
(log-format, server rules, etc). These expressions may use external files like
maps.

If some particular 'default-path' was set in the global section before, it's no
longer applied to resolve file pathes in check_config_validity(). parse_cfg()
at the end of config parsing switches back to the initial cwd.

This fixes the issue #2886.

This patch should be backported in all stable versions since 2.4.0, including
2.4.0.
include/haproxy/cfgparse.h
src/cfgparse.c
src/haproxy.c