Hi,
I am running into a problem with sshd. sshd is invoked by a process
(say X)
which sends sighup to it if there is a configuration change automatically.
If
user changes the configuration in quick succession then sshd gets
terminated.
I think the problem is that sshd installs its signal handlers after key
generation is done. It takes a while for key generation (server key, I am
using ssh protocol version 1) step to be complete. If user changes the
configuration in quick succession then X ends up sending sighups to the sshd
process causing it to be killed since it is still in the process of
generating the server key and yet to install the sighup handler.
I could fix this by putting the installation of sighup signal handler before
the key generation step. It works fine as sighup handler keeps handling the
sighup signals and then later on re-reads the configuration file since
received_sighup variable is set to 1.
My question is by making this change, will I be creating any security hole?
Is
there a better way to fix it? Is there a reason why signal handlers are not
installed first?
Any help will be greatly appreciated.
Thanks,
Dm