Subject: bin/15912: sshd_conf_dir="/etc" doesn't.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <prlw1@cam.ac.uk>
List: netbsd-bugs
Date: 03/14/2002 18:56:46
>Number:         15912
>Category:       bin
>Synopsis:       sshd_conf_dir="/etc" doesn't.
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 14 10:57:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Patrick Welche
>Release:        NetBSD 1.5ZB
>Organization:
	
>Environment:
>Description:
It's critical in the sense that, you have your sshd.conf file in /etc.
The default location of said config file has been changed in
/etc/defaults/rc.conf, so you pop
			sshd_conf_dir="/etc"    # directory for sshd conf files
in /etc/rc.conf to override /etc/ssh. Then reboot the machine (in my
case that was an accident), and no sshd will come up because it can't
find its configuration file. (So in my case you can't get to the machine)
>How-To-Repeat:
Leave your config files in /etc, add sshd_conf_dir="/etc" to /etc/rc.conf,
cd /etc/rc.d
sh -ex ./sshd
>Fix:
I'm assuming that sshd_flags would get overwritten by something in
/etc/rc.conf, so command_args is the one to use?

Index: sshd
===================================================================
RCS file: /cvsroot/basesrc/etc/rc.d/sshd,v
retrieving revision 1.13
diff -p -r1.13 sshd
*** sshd	2002/02/24 12:50:09	1.13
--- sshd	2002/03/14 18:29:01
*************** command="/usr/sbin/${name}"
*** 14,19 ****
--- 14,20 ----
  pidfile="/var/run/${name}.pid"
  load_rc_config $name
  required_files="${sshd_conf_dir}/${name}.conf"
+ command_args="-f${sshd_conf_dir}/${name}.conf"
  extra_commands="keygen reload"
  
  sshd_keygen()
>Release-Note:
>Audit-Trail:
>Unformatted:
 source from Mar 12 2002 19:46 GMT