]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: (subdir) support unshared sessions too
authorKarel Zak <kzak@redhat.com>
Tue, 2 May 2023 11:27:52 +0000 (13:27 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 2 May 2023 11:27:52 +0000 (13:27 +0200)
commit1a0f793e58cf2e4dfcf59d6df38b5b6fec7c3036
tree4ac5c221aad2391d012d82fb27456cff1564167e
parent926885e442a5ac36bc4b1b9fe62956898169e87d
libmount: (subdir) support unshared sessions too

* enter original namespace for the final move_mount(), it means that
  the original unshare() (to create the temporary mount) will be
  ineffective for this final step. God bless FD based APIs (setns()
  and open_tree())! ;-)

* improve cleanup code (call umount only once)

* remember private namespace

* update note in man page

Addresses: https://github.com/util-linux/util-linux/pull/2198
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/hook_subdir.c
sys-utils/mount.8.adoc
tests/ts/mount/subdir