]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: fix tree FD usage in subdir hook
authorKarel Zak <kzak@redhat.com>
Mon, 3 Jun 2024 10:33:01 +0000 (12:33 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 3 Jun 2024 12:45:11 +0000 (14:45 +0200)
commit2a684833d723e29af0ba772b3e6917492c69e023
tree74c909042240770e9c0b92d8794143a947c323d3
parent0284eb3a8a6505dd9745b042089046ad368bfe74
libmount: fix tree FD usage in subdir hook

* Initialize the tree file descriptor in the hook_subdir.c module if
  it has not been initialized yet. (hook_mount.c does not open the
  tree if the mount.<type> helper will be executed.)

* Move the function to open the tree to context.c to make it more
  generic and usable in more places.

Reported-by: Linus Heckemann <git@sphalerite.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context.c
libmount/src/hook_mount.c
libmount/src/hook_subdir.c
libmount/src/mountP.h