]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
vmspawn: ignore failure from sshd-vsock@ unit
authorMartin Hundebøll <martin@geanix.com>
Thu, 6 Feb 2025 10:33:49 +0000 (11:33 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 6 Feb 2025 15:49:11 +0000 (16:49 +0100)
The "main" sshd@.service unit ignores the return code from per-session
instances, so do the same for the vsock variant.

src/vmspawn/vmspawn.c

index 845c06dea2b12c8f229d9d2dbed9106356901c67..7e1310fa4f5b2e8137e5f42eaf3653c4a07b1d87 100644 (file)
@@ -2053,7 +2053,7 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) {
                                 "systemd.unit-dropin.sshd-vsock@.service:"
                                 "[Service]\n"
                                 "ExecStart=\n"
-                                "ExecStart=sshd -i -o 'AuthorizedKeysFile=%d/ssh.ephemeral-authorized_keys-all .ssh/authorized_keys'\n"
+                                "ExecStart=-sshd -i -o 'AuthorizedKeysFile=%d/ssh.ephemeral-authorized_keys-all .ssh/authorized_keys'\n"
                                 "ImportCredential=ssh.ephemeral-authorized_keys-all\n");
                 if (r < 0)
                         return log_error_errno(r, "Failed to set credential systemd.unit-dropin.sshd-vsock@.service: %m");