NetBSD Problem Report #48825

From fukachan@fml.org  Wed May 21 05:30:53 2014
Return-Path: <fukachan@fml.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id D9561A64ED
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 21 May 2014 05:30:52 +0000 (UTC)
Message-Id: <20140521041059.679E261769C@elena.home.fml.org>
Date: Wed, 21 May 2014 13:10:59 +0900 (JST)
From: fukachan@fml.org
Reply-To: fukachan@fml.org
To: gnats-bugs@gnats.NetBSD.org
Subject: rc.d script of pkgsrc/security/openssh not support ed25519
X-Send-Pr-Version: 3.95

>Number:         48825
>Category:       pkg
>Synopsis:       rc.d script of pkgsrc/security/openssh not support ed25519
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    taca
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 21 05:35:00 +0000 2014
>Closed-Date:    Sun Nov 23 01:15:42 +0000 2014
>Last-Modified:  Sun Nov 23 01:15:42 +0000 2014
>Originator:     Ken'ichi Fukamachi
>Release:        NetBSD 5.2_STABLE
>Organization:
fml.org
>Environment:
	System: NetBSD example.fml.org 5.2_STABLE NetBSD 5.2_STABLE (HOME_SERVER) #0: Sun Mar 2 12:04:31 JST 2014 fukachan@example.fml.org:/var/nbbuild/build.m_i386.netbsd-5.2_STABLE/obj/var/.ourfs/netbsd/520p/src/sys/arch/i386/compile/HOME_SERVER i386
Architecture: i386
Machine: i386
>Description:
	pkgsrc/security/openssh/files/sshd.sh not support ed25519 key,
	so show the error message 
	"error: Could not load host key: /usr/pkg/etc/ssh/ssh_host_ed25519_key" 
	each time sshd forked.

>How-To-Repeat:
	install pkgsrc/security/openssh and start it by
	/usr/pkg/share/examples/rc.d/sshd
>Fix:

Index: files/sshd.sh
===================================================================
RCS file: /cvsroot/pkgsrc/security/openssh/files/sshd.sh,v
retrieving revision 1.13
diff -u -b -r1.13 sshd.sh
--- files/sshd.sh	17 May 2011 03:26:52 -0000	1.13
+++ files/sshd.sh	21 May 2014 03:33:15 -0000
@@ -50,6 +50,14 @@
 		${keygen_command} -t ecdsa -f @PKG_SYSCONFDIR@/ssh_host_ecdsa_key -N ''
 	fi
 /* HAVE_ECDSA_STOP */
+/* HAVE_ED25519_START */
+	if [ -f @PKG_SYSCONFDIR@/ssh_host_ed25519_key ]; then
+		@ECHO@ "You already have a ED25519 host key in @PKG_SYSCONFDIR@/ssh_host_ed25519_key"
+		@ECHO@ "Skipping protocol version 2 ED25519 Key Generation"
+	else
+		${keygen_command} -t ed25519 -f @PKG_SYSCONFDIR@/ssh_host_ed25519_key -N ''
+	fi
+/* HAVE_ED25519_STOP */
 	)
 }

@@ -58,7 +66,8 @@
 	if [ ! -f @PKG_SYSCONFDIR@/ssh_host_key -o \
 	     ! -f @PKG_SYSCONFDIR@/ssh_host_dsa_key -o \
 	     ! -f @PKG_SYSCONFDIR@/ssh_host_rsa_key -o \
-	     ! -f @PKG_SYSCONFDIR@/ssh_host_ecdsa_key ]; then
+	     ! -f @PKG_SYSCONFDIR@/ssh_host_ecdsa_key -o \
+	     ! -f @PKG_SYSCONFDIR@/ssh_host_ed25519_key ]; then
 		if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -f /etc/rc.d/DAEMON ]
 		then
 			run_rc_command keygen

>Release-Note:

>Audit-Trail:
From: "Takahiro Kambe" <taca@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48825 CVS commit: pkgsrc/security/openssh
Date: Thu, 22 May 2014 03:14:01 +0000

 Module Name:	pkgsrc
 Committed By:	taca
 Date:		Thu May 22 03:14:01 UTC 2014

 Modified Files:
 	pkgsrc/security/openssh: Makefile
 	pkgsrc/security/openssh/files: sshd.sh

 Log Message:
 Update patch to stop error message with rc.d script.
 It was noted by Ken'ichi Fukamachi via PR pkg/48825.

 Bump PKGREVISION.


 To generate a diff of this commit:
 cvs rdiff -u -r1.218 -r1.219 pkgsrc/security/openssh/Makefile
 cvs rdiff -u -r1.13 -r1.14 pkgsrc/security/openssh/files/sshd.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: pkg-manager->taca
Responsible-Changed-By: taca@NetBSD.org
Responsible-Changed-When: Thu, 22 May 2014 03:16:25 +0000
Responsible-Changed-Why:
I take this PR.


State-Changed-From-To: open->feedback
State-Changed-By: taca@NetBSD.org
State-Changed-When: Thu, 22 May 2014 03:16:25 +0000
State-Changed-Why:
The patch was applied.


State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 23 Nov 2014 01:15:42 +0000
State-Changed-Why:
Feedback timeout.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.