[PATCH] sshd unable to restart
Darren Tucker
dtucker at zip.com.au
Fri May 30 01:01:08 EST 2003
Dag-Erling Smorgrav wrote:
> Darren Tucker <dtucker at zip.com.au> writes:
> > It's in OpenSSH Portable only. OpenBSD has setproctitle() so does not
> > need to clobber argv.
>
> Hmm. In that case, I don't see why the bug affects FreeBSD, since we
> also have setproctitle(). Must be something wrong with my config.h.
Currently Portable's sshd copies argv on all platforms regardless of
whether it has setproctitle or not, just in case argv gets clobbered
later. I guess you could have the following, which might be marginally
cleaner:
saved_argc = ac;
saved_argv = av;
#ifndef HAVE_SETPROCTITLE
/* Save argv. Duplicate so setproctitle emulation doesn't clobber it */
[...]
/* Prepare for later setproctitle emulation */
compat_init_setproctitle(ac, av);
#endif
OpenBSD's sshd doesn't have to deal with the argv clobbering case at
all, so doesn't have the problem code.
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
More information about the openssh-unix-dev
mailing list