diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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); |