Files
systemd/src/shared
Daan De Meyer 273c6bc045 mount-util: Add mount_fd_clone() helper
The kernel prevents you from open_tree()'ing an open_tree() fd unless it
was created from the caller's mount namespace. For various use cases, we
want to be able to open_tree() arbitrary mount file descriptors. Turns
out there's a way go get around it by mounting the mount file descriptor
in a throw-away mount namespace and then open_tree()'ing the mount file
descriptor. Let's implement this as a new helper mount_fd_clone() and
add a test for it.

Because move_mount()'ing the original fd makes it pretty useless as it
can't be move_mount()'ed again, we optionally make a second clone which
can replace the original fd so it can be cloned again later.
2025-12-14 11:31:59 +01:00
..
…
…
…
2025-11-09 18:13:44 +09:00
2025-06-18 01:55:46 +09:00
2025-06-18 01:55:46 +09:00
2025-07-17 17:13:17 +02:00
…
…
…
…
2025-09-19 14:46:55 +02:00
2025-10-16 03:26:39 -07:00
2025-07-08 10:22:59 +02:00
2025-11-25 15:32:37 +01:00
2025-11-22 09:42:41 +09:00
2025-11-25 17:34:48 +01:00
2025-11-15 07:44:24 +01:00
2025-11-02 17:03:03 +09:00
…
…
…