]> git.ipfire.org Git - thirdparty/systemd.git/commit
fd-util: skip to check mount ID if kernel is too old and /proc is not mounted
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 17 Apr 2023 14:37:12 +0000 (23:37 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 18 Apr 2023 18:38:47 +0000 (03:38 +0900)
commit8d3c49b1680a20ae5d157baa4adaa59c1ea33519
tree8d9ae68b9427fa964bcf5211c348a84a4e2c87d8
parent4b1e461c49ea935df0c740b31aecfd161b12d2e7
fd-util: skip to check mount ID if kernel is too old and /proc is not mounted

Now, dir_fd_is_root() is heavily used in chaseat(), which is used at
various places. If the kernel is too old and /proc is not mounted, then
there is no way to get the mount ID of a directory. In that case, let's
silently skip the mount ID check.

Fixes https://github.com/systemd/systemd/pull/27299#issuecomment-1511403680.
src/basic/fd-util.c