Subject: bin/12198: add support for SSH_CONF_DIR to ssh
To: None <>
From: None <>
List: netbsd-bugs
Date: 02/12/2001 20:53:58
>Number:         12198
>Category:       bin
>Synopsis:       add support for SSH_CONF_DIR to ssh
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 12 19:55:01 PST 2001
>Originator:     Jim Bernard
>Release:        February 12, 2001
System: NetBSD zoo 1.5R NetBSD 1.5R (ZOO-$Revision: 1.61 $) #0: Sat Feb 3 13:32:09 MST 2001 jim@zoo:/home/tmp/compile/sys/arch/i386/compile/ZOO i386
Architecture: i386
Machine: i386
	The collection of configuration and related files needed to operate
	ssh and sshd is large enough to constitute a pretty ugly mess in
	/etc, the default location of the files (ssh.conf, ssh_host_dsa_key,, ssh_host_key,, ssh_known_hosts,
	ssh_known_hosts2, sshd.conf, primes).  It's much nicer to put these
	all into a subdirectory, such as /etc/ssh.  The option to do that
	has existed in the packaged versions of ssh for some time, in the
	form of a mk.conf variable called SSH_CONF_DIR.  It would be really
	nice to have that available for the in-tree openssh as well.  A
	pair of patches implementing this is attached below.

	Use the in-tree openssh.  Note the mess it makes in /etc.  Wish that
	it were better.

	These patches are to src/crypto/dist/ssh/pathnames.h and
	src/usr.bin/ssh/  The default behavior of putting
	all the files in /etc is maintained, though I would think the
	rest of the world would be dying to move these into a subdirectory
	too and would prefer to move the default location instead of
	making this optional change.  I sent a message to Markus Friedl
	(maintainer of openssh) asking if he would consider changing the
	default but received no response.

--- pathnames.h-dist	Mon Feb 12 09:09:43 2001
+++ pathnames.h	Mon Feb 12 15:11:59 2001
@@ -10,11 +10,15 @@
  * software must be clearly marked as such, and if the derived work is
  * incompatible with the protocol description in the RFC file, it must be
  * called by a name other than "ssh" or "Secure Shell".
+#ifdef SSH_CONF_DIR
 #define ETCDIR				"/etc"
 #define _PATH_SSH_PIDDIR		"/var/run"
  * System-wide file containing host keys of known hosts.  This file should be
  * world-readable.
---	Mon Feb 12 10:31:24 2001
+++	Mon Feb 12 16:11:16 2001
@@ -1,10 +1,13 @@
 #	$NetBSD:,v 1.5 2001/02/07 17:05:36 itojun Exp $
 SSHDIST?= ${.CURDIR}/../../../crypto/dist/ssh
+.if !empty(SSH_CONF_DIR)
 .if defined(PROG)
 LIBSSHOBJDIR != cd ${.CURDIR}/../libssh && ${PRINTOBJDIR}