]> 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)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 8 Feb 2025 06:51:06 +0000 (15:51 +0900)
The "main" sshd@.service unit ignores the return code from per-session
instances, so do the same for the vsock variant.

(cherry picked from commit df8bd4c171bf88feef0302a0d0476e22e5594c82)

src/vmspawn/vmspawn.c

index 1c49aff4a3b78bc570d7d4b8b8d60e76c07b774f..70e5a312656f3b8ff69796fc343b36a9b6d95c48 100644 (file)
@@ -2050,7 +2050,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");