diff options
author | Darren Tucker <dtucker@zip.com.au> | 2009-06-21 17:48:00 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2009-06-21 17:48:00 +1000 |
commit | 72efd74d2fd3d871210322e8a48f38e2baafc207 (patch) | |
tree | a94fff198bc7aa16bf8c00c3019755a7c943ae8a /ssh.c | |
parent | 3278062bf3e2e435163998feca90c13e80d53d5d (diff) |
- (dtucker) OpenBSD CVS Sync
- markus@cvs.openbsd.org 2009/03/17 21:37:00
[ssh.c]
pass correct argv[0] to openlog(); ok djm@
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh.c,v 1.324 2009/02/12 03:00:56 djm Exp $ */ | 1 | /* $OpenBSD: ssh.c,v 1.325 2009/03/17 21:37:00 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -204,7 +204,7 @@ int | |||
204 | main(int ac, char **av) | 204 | main(int ac, char **av) |
205 | { | 205 | { |
206 | int i, opt, exit_status, use_syslog; | 206 | int i, opt, exit_status, use_syslog; |
207 | char *p, *cp, *line, buf[256]; | 207 | char *p, *cp, *line, *argv0, buf[256]; |
208 | struct stat st; | 208 | struct stat st; |
209 | struct passwd *pw; | 209 | struct passwd *pw; |
210 | int dummy, timeout_ms; | 210 | int dummy, timeout_ms; |
@@ -270,6 +270,7 @@ main(int ac, char **av) | |||
270 | /* Parse command-line arguments. */ | 270 | /* Parse command-line arguments. */ |
271 | host = NULL; | 271 | host = NULL; |
272 | use_syslog = 0; | 272 | use_syslog = 0; |
273 | argv0 = av[0]; | ||
273 | 274 | ||
274 | again: | 275 | again: |
275 | while ((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:p:qstvx" | 276 | while ((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:p:qstvx" |
@@ -600,7 +601,7 @@ main(int ac, char **av) | |||
600 | * Initialize "log" output. Since we are the client all output | 601 | * Initialize "log" output. Since we are the client all output |
601 | * actually goes to stderr. | 602 | * actually goes to stderr. |
602 | */ | 603 | */ |
603 | log_init(av[0], | 604 | log_init(argv0, |
604 | options.log_level == -1 ? SYSLOG_LEVEL_INFO : options.log_level, | 605 | options.log_level == -1 ? SYSLOG_LEVEL_INFO : options.log_level, |
605 | SYSLOG_FACILITY_USER, !use_syslog); | 606 | SYSLOG_FACILITY_USER, !use_syslog); |
606 | 607 | ||
@@ -628,7 +629,7 @@ main(int ac, char **av) | |||
628 | channel_set_af(options.address_family); | 629 | channel_set_af(options.address_family); |
629 | 630 | ||
630 | /* reinit */ | 631 | /* reinit */ |
631 | log_init(av[0], options.log_level, SYSLOG_FACILITY_USER, !use_syslog); | 632 | log_init(argv0, options.log_level, SYSLOG_FACILITY_USER, !use_syslog); |
632 | 633 | ||
633 | seed_rng(); | 634 | seed_rng(); |
634 | 635 | ||