]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ssh-generator: add missing newline before [Service] and trailing NL to generated...
authorMike Yuan <me@yhndnzj.com>
Wed, 28 May 2025 20:30:46 +0000 (22:30 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 25 Jun 2025 17:17:42 +0000 (18:17 +0100)
(cherry picked from commit e72bd8dbc867dbd68fa48b22f258feeb7760caa6)
(cherry picked from commit 654c60ba171aa47a466f91557f058fa30e7f7234)

src/ssh-generator/ssh-generator.c

index fd5c08474e779fbb3816d343e8fd746098074822..9a1f67e4e3820f9e83b3a0066449297ff46e0f6a 100644 (file)
@@ -107,10 +107,11 @@ static int make_sshd_template_unit(
                         "[Unit]\n"
                         "Description=OpenSSH Per-Connection Server Daemon\n"
                         "Documentation=man:systemd-ssh-generator(8) man:sshd(8)\n"
+                        "\n"
                         "[Service]\n"
                         "ExecStart=-%s -i -o \"AuthorizedKeysFile ${CREDENTIALS_DIRECTORY}/ssh.ephemeral-authorized_keys-all .ssh/authorized_keys\"\n"
                         "StandardInput=socket\n"
-                        "ImportCredential=ssh.ephemeral-authorized_keys-all",
+                        "ImportCredential=ssh.ephemeral-authorized_keys-all\n",
                         sshd_binary);
 
                 r = fflush_and_check(f);