Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] openssh: Move key generation to the start function of init script.
Date: Fri, 24 Feb 2017 15:32:07 +0100	[thread overview]
Message-ID: <20170224143207.GB3908@free.fr> (raw)
In-Reply-To: <20170224142623.yldyeed3aif3w6de@zenon.in.qult.net>

Ignacy, All,

On 2017-02-24 15:26 +0100, Ignacy Gaw?dzki spake thusly:
> Since there's not much point in generating missing host keys when the
> init script is called with "stop", the call to ssh-keygen should not
> be done inconditionally, but in the start function instead.
> 
> Signed-off-by: Ignacy Gaw?dzki <ignacy.gawedzki@green-communications.fr>

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

To be noted: there is nothing to do in the systemd service file, as it
is already a ExecStartPre action (i.e. what this patch does for SyS-V).

Regards,
Yann E. MORIN.

> ---
>  package/openssh/S50sshd | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/package/openssh/S50sshd b/package/openssh/S50sshd
> index c151142..22da41d 100644
> --- a/package/openssh/S50sshd
> +++ b/package/openssh/S50sshd
> @@ -6,12 +6,12 @@
>  # Make sure the ssh-keygen progam exists
>  [ -f /usr/bin/ssh-keygen ] || exit 0
>  
> -# Create any missing keys
> -/usr/bin/ssh-keygen -A
> -
>  umask 077
>  
>  start() {
> +	# Create any missing keys
> +	/usr/bin/ssh-keygen -A
> +
>  	printf "Starting sshd: "
>  	/usr/sbin/sshd
>  	touch /var/lock/sshd
> -- 
> 2.9.3
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2017-02-24 14:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-24 14:26 [Buildroot] [PATCH] openssh: Move key generation to the start function of init script Ignacy Gawędzki
2017-02-24 14:32 ` Yann E. MORIN [this message]
2017-02-26 13:38 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170224143207.GB3908@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox