summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sshd.c b/sshd.c
index 8bf1557a2..8a7ec6b8e 100644
--- a/sshd.c
+++ b/sshd.c
@@ -827,9 +827,17 @@ main(int ac, char **av)
827 __progname = get_progname(av[0]); 827 __progname = get_progname(av[0]);
828 init_rng(); 828 init_rng();
829 829
830 /* Save argv. */ 830 /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */
831 saved_argc = ac; 831 saved_argc = ac;
832 saved_argv = av; 832 saved_argv = av;
833 saved_argv = xmalloc(sizeof(*saved_argv) * ac);
834 for (i = 0; i < ac; i++)
835 saved_argv[i] = xstrdup(av[i]);
836
837#ifndef HAVE_SETPROCTITLE
838 /* Prepare for later setproctitle emulation */
839 compat_init_setproctitle(ac, av);
840#endif
833 841
834 /* Initialize configuration options to their default values. */ 842 /* Initialize configuration options to their default values. */
835 initialize_server_options(&options); 843 initialize_server_options(&options);