summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-06-02 12:15:54 +1000
committerDamien Miller <djm@mindrot.org>2003-06-02 12:15:54 +1000
commitf2e3e9deba2de12a01de9cf74befb6e94a3781d2 (patch)
tree85283bfed3c9258536506c355907f0dae59fc37d
parentf3bff949576dbc207f958b38f56ed6df686a5e0c (diff)
- (djm) Always use saved_argv in sshd.c as compat_init_setproctitle may
clobber
-rw-r--r--ChangeLog4
-rw-r--r--sshd.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 408540490..118f29dd9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
120030602 120030602
2 - (djm) Fix segv from bad reordering in auth-pam.c 2 - (djm) Fix segv from bad reordering in auth-pam.c
3 - (djm) Always use saved_argv in sshd.c as compat_init_setproctitle may
4 clobber
3 5
420030530 620030530
5 - (dtucker) Add missing semicolon in md5crypt.c, patch from openssh at 7 - (dtucker) Add missing semicolon in md5crypt.c, patch from openssh at
@@ -1626,4 +1628,4 @@
1626 save auth method before monitor_reset_key_state(); bugzilla bug #284; 1628 save auth method before monitor_reset_key_state(); bugzilla bug #284;
1627 ok provos@ 1629 ok provos@
1628 1630
1629$Id: ChangeLog,v 1.2755 2003/06/02 02:13:40 djm Exp $ 1631$Id: ChangeLog,v 1.2756 2003/06/02 02:15:54 djm Exp $
diff --git a/sshd.c b/sshd.c
index 3f1e9ff64..eb4e4876e 100644
--- a/sshd.c
+++ b/sshd.c
@@ -825,7 +825,6 @@ main(int ac, char **av)
825 825
826 /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */ 826 /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */
827 saved_argc = ac; 827 saved_argc = ac;
828 saved_argv = av;
829 saved_argv = xmalloc(sizeof(*saved_argv) * (ac + 1)); 828 saved_argv = xmalloc(sizeof(*saved_argv) * (ac + 1));
830 for (i = 0; i < ac; i++) 829 for (i = 0; i < ac; i++)
831 saved_argv[i] = xstrdup(av[i]); 830 saved_argv[i] = xstrdup(av[i]);
@@ -834,6 +833,7 @@ main(int ac, char **av)
834#ifndef HAVE_SETPROCTITLE 833#ifndef HAVE_SETPROCTITLE
835 /* Prepare for later setproctitle emulation */ 834 /* Prepare for later setproctitle emulation */
836 compat_init_setproctitle(ac, av); 835 compat_init_setproctitle(ac, av);
836 av = saved_argv;
837#endif 837#endif
838 838
839 /* Initialize configuration options to their default values. */ 839 /* Initialize configuration options to their default values. */