Bug in sshd bootscript

Larry larry at linuxfromscratch.org
Fri Jan 17 07:25:37 PST 2003


On Fri, Jan 17, 2003 at 09:51:42AM +0100, Debian User wrote:
> 
> I only "copy and paste" the scripts from BLFS-Book and it seems the path
> isn't the problem in lfs-bootscripts but in sshd.
> 
> sshd.c:
> /*
>  * Called from the main program after receiving SIGHUP.
>  * Restarts the server.
>  */
> static void
> sighup_restart(void)
> {
> 	log("Received SIGHUP; restarting.");
> 	close_listen_socks();
> 	close_startup_pipes();
> 	execv(saved_argv[0], saved_argv);
> 	log("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0],
> 	    strerror(errno));
> 	exit(1);
> }
> 
> If sshd is invoked as "sshd" it can't find it's executable at restart.
> Does it clear it's environment ?

It would be using the environment set when it was invoked. Do you have
/usr/sbin in your path statement for root?

I have to test my reload locally, so that will be in a few hours.  I
will try to resolve this this weekend.

Larry

> 
> So I think it's not a bug in blfs-bootscripts but a feature in OpenSSH :).
> 
> Can anyboby reproduce this behavior ?
> And what's the best fix, patch the script or OpenSSH ?
> 
> Jochen
> -- 
> Unsubscribe: send email to listar at linuxfromscratch.org
> and put 'unsubscribe blfs-dev' in the subject header of the message
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-dev' in the subject header of the message



More information about the blfs-dev mailing list