diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-03-14 11:09:46 +0100 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2023-10-02 15:02:32 +0200 |
commit | 8d9a1d5979a9290f23925f482690fee680990a8e (patch) | |
tree | 01bd4002fa5d5460654658f028ba8515e7061585 /src/sysext | |
parent | mount-util: add make_fsmount() (diff) | |
download | systemd-8d9a1d5979a9290f23925f482690fee680990a8e.tar.xz systemd-8d9a1d5979a9290f23925f482690fee680990a8e.zip |
dissect-image: optionally allow mounting via new kernel mount API in two steps
This adds support for the new fsmount() logic of the kernel: we'll first
create an unattached fsmount fd, and then in a second step attach this
to some real file system inode – as opposed to attaching file system
directly. The benefit of this is that we can pass the open fsmount fds
over some sockets if need be, to isolate the mounting code from the
attaching code.
Diffstat (limited to 'src/sysext')
-rw-r--r-- | src/sysext/sysext.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sysext/sysext.c b/src/sysext/sysext.c index 5099bdcb4e..33bfb3dc80 100644 --- a/src/sysext/sysext.c +++ b/src/sysext/sysext.c @@ -712,8 +712,9 @@ static int merge_subprocess(Hashmap *images, const char *workspace) { r = dissected_image_mount_and_warn( m, p, - UID_INVALID, - UID_INVALID, + /* uid_shift= */ UID_INVALID, + /* uid_range= */ UID_INVALID, + /* userns_fd= */ -EBADF, flags); if (r < 0 && r != -ENOMEDIUM) return r; |