Thanks, applied as 2e864fb02dbb3733f2ef3808b86364441da364a2.

Michael

[sent from post-receive hook]

On Fri, 26 Nov 2021 15:35:05 +0100, Alexander Dahl <[email protected]> wrote:
> Previously just existence of a key file was checked, which allowed
> empty key files or invalid key files to persist. That would have
> prevented dropbear server daemon startup.
> 
> Note: this does not always regenerate keys, only if rc-once is triggered
> and run again for whatever reason.
> 
> Signed-off-by: Alexander Dahl <[email protected]>
> Message-Id: <[email protected]>
> Signed-off-by: Michael Olbrich <[email protected]>
> 
> diff --git a/projectroot/etc/rc.once.d/dropbear 
> b/projectroot/etc/rc.once.d/dropbear
> index b1c40fdbbe5c..8a04406242e4 100644
> --- a/projectroot/etc/rc.once.d/dropbear
> +++ b/projectroot/etc/rc.once.d/dropbear
> @@ -8,7 +8,8 @@ gen_key() {
>       key_type=$1
>       key_file=$2
>  
> -     [ -e "$key_file" ] && return
> +     # do not overwrite valid key files
> +     [ -s "$key_file" ] && dropbearkey -y -f "$key_file" > /dev/null 2>&1 && 
> return
>  
>       rm -f $key_file > /dev/null 2>&1
>  

_______________________________________________
ptxdist mailing list
[email protected]
To unsubscribe, send a mail with subject "unsubscribe" to 
[email protected]

Reply via email to