- (djm) Bug #529: sshd doesn't work correctly after SIGHUP (copy argv

correctly)
This commit is contained in:
Damien Miller 2003-05-15 21:29:10 +10:00
parent b10f1cd878
commit 04cb536054
2 changed files with 6 additions and 2 deletions

View File

@ -49,6 +49,9 @@
- (djm) Avoid uuencode.c warnings
- (djm) Enable UsePAM when built --with-pam
- (djm) Only build getrrsetbyname replacement when using --with-dns
- (djm) Bug #529: sshd doesn't work correctly after SIGHUP (copy argv
correctly)
20030514
- (djm) Bug #117: Don't lie to PAM about username
- (djm) RCSID sync w/ OpenBSD
@ -1523,4 +1526,4 @@
save auth method before monitor_reset_key_state(); bugzilla bug #284;
ok provos@
$Id: ChangeLog,v 1.2720 2003/05/15 10:55:27 djm Exp $
$Id: ChangeLog,v 1.2721 2003/05/15 11:29:10 djm Exp $

3
sshd.c
View File

@ -830,9 +830,10 @@ main(int ac, char **av)
/* Save argv. Duplicate so setproctitle emulation doesn't clobber it */
saved_argc = ac;
saved_argv = av;
saved_argv = xmalloc(sizeof(*saved_argv) * ac);
saved_argv = xmalloc(sizeof(*saved_argv) * (ac + 1));
for (i = 0; i < ac; i++)
saved_argv[i] = xstrdup(av[i]);
saved_argv[i] = NULL;
#ifndef HAVE_SETPROCTITLE
/* Prepare for later setproctitle emulation */