ssh-generator: two cleanups (#37649)

This commit is contained in:
Mike Yuan
2025-05-29 02:26:44 +02:00
committed by GitHub

View File

@@ -111,10 +111,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);
@@ -459,7 +460,7 @@ static int run(const char *dest, const char *dest_early, const char *dest_late)
strv_sort_uniq(arg_listen_extra);
if (!arg_auto && strv_isempty(arg_listen_extra)) {
log_debug("Disabling SSH generator logic, because as it has been turned off explicitly.");
log_debug("Disabling SSH generator logic, because it has been turned off explicitly.");
return 0;
}