From: Sam Leonard Date: Wed, 13 Mar 2024 15:20:40 +0000 (+0000) Subject: vmspawn: fix FD passing logic X-Git-Tag: v256-rc1~536^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4364a542e3fdaa25ec4d12c42d9e7d048563fb3a;p=thirdparty%2Fsystemd.git vmspawn: fix FD passing logic --- diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c index 6d67d0f6e43..5ab0053be91 100644 --- a/src/vmspawn/vmspawn.c +++ b/src/vmspawn/vmspawn.c @@ -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)