]> git.ipfire.org Git - thirdparty/systemd.git/commit
find-esp: replace assert by a runtime check
authorDavid Tardon <dtardon@redhat.com>
Fri, 5 Dec 2025 12:09:16 +0000 (13:09 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 9 Dec 2025 05:36:31 +0000 (14:36 +0900)
commit50482aced5c86ec8ad1962b33cf79464dc06b462
treeb68948b2a18f83a9d5200f6a02c8559769ec3d44
parenta28ed65f4ca8907100bb935f67d6dd8d73ad66ba
find-esp: replace assert by a runtime check

The path--as a whole--is no longer being opened with O_DIRECTORY, hence
the assertion is not valid.

Reproducer:
 # SYSTEMD_RELAX_ESP_CHECKS=1 bootctl list --esp-path=`pwd`/README
 Assertion 'S_ISDIR(sxa.stx_mode)' failed at src/shared/find-esp.c:295, function verify_fsroot_dir(). Aborting.

Follow-up-for: 63105f33edad423691e2d53bf7071f99c83799ba

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2417917
src/shared/find-esp.c