diff options
author | Damien Miller <djm@mindrot.org> | 2003-01-10 09:53:12 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2003-01-10 09:53:12 +1100 |
commit | a8ed44b79e6dd78d7871b0fb8149951b54662ef5 (patch) | |
tree | cca59d396ec59133ec1c42536eca25d087dcfcc7 /sshd.c | |
parent | 13b2e55c36ec316bd4ec15e830c9eae888d2cb68 (diff) | |
download | openssh-git-a8ed44b79e6dd78d7871b0fb8149951b54662ef5.tar.gz |
- (djm) Enable new setproctitle emulation for Linux, AIX and HP/UX. More
systems may be added later.
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) __progname = get_progname(av[0]); init_rng(); - /* Save argv. */ + /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */ saved_argc = ac; saved_argv = av; + saved_argv = xmalloc(sizeof(*saved_argv) * ac); + for (i = 0; i < ac; i++) + saved_argv[i] = xstrdup(av[i]); + +#ifndef HAVE_SETPROCTITLE + /* Prepare for later setproctitle emulation */ + compat_init_setproctitle(ac, av); +#endif /* Initialize configuration options to their default values. */ initialize_server_options(&options); |