]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
vmspawn: fix FD passing logic 31761/head
authorSam Leonard <sam.leonard@codethink.co.uk>
Wed, 13 Mar 2024 15:20:40 +0000 (15:20 +0000)
committerSam Leonard <sam.leonard@codethink.co.uk>
Wed, 13 Mar 2024 15:32:08 +0000 (15:32 +0000)
src/vmspawn/vmspawn.c

index 6d67d0f6e431e6cf94b1b61683d3b6e678a35f1b..5ab0053be9142e27a48e2ce431d72875286a9048 100644 (file)
@@ -1736,7 +1736,7 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) {
         r = pidref_safe_fork_full(
                         qemu_binary,
                         /* stdio_fds= */ NULL,
-                        &child_vsock_fd, 1, /* pass the vsock fd to qemu */
+                        pass_fds, n_pass_fds,
                         FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_DEATHSIG_SIGTERM|FORK_LOG|FORK_CLOEXEC_OFF|FORK_RLIMIT_NOFILE_SAFE,
                         &child_pidref);
         if (r < 0)