/etc/init.d/sshd contains the function checkconfig() for sanity checking of sshd setup and configuration (using sshd itself for the latter, see also "-t" flag for sshd). It does this only on "start", thus opening a problem path: Both "restart" and "reload" (specific function for sshd) will shut down a running sshd even if it cannot be started afterwards due to broken setup/configuration. The patch to be attached by me will just insert the sanity check into restarts/reloads as well, so the admin gets aware before locking himself out. The lockout however can only be triggered if the admin logs out without caring for the result of the restart/reload. Thus this bug's importance is quite low. Reproducible: Always Steps to Reproduce: 1. Make invalid change to sshd_config 2.a. /etc/init.d/sshd restart 2.b. /etc/init.d/sshd reload Actual Results: sshd master process killed, no new one started up Expected Results: sshd complaining on invalid configuration, old instance still running
Created attachment 131160 [details, diff] proposed fix, added check to reload(), added restart() w/ check
fixed in cvs, thanks for the suggestion