summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2009-03-17 21:37:00 +0000
committermarkus <markus@openbsd.org>2009-03-17 21:37:00 +0000
commitf53afdb15359f4a7840852f45d8e67030194ba1d (patch)
tree863f3d5b70be175213b7fedcbdd4533dd6f4bf65 /usr.bin/ssh/ssh.c
parentcorrect argument type for swap64(); from Thomas Pfaff (diff)
downloadwireguard-openbsd-f53afdb15359f4a7840852f45d8e67030194ba1d.tar.xz
wireguard-openbsd-f53afdb15359f4a7840852f45d8e67030194ba1d.zip
pass correct argv[0] to openlog(); ok djm@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 49cdfed145a..74c1510c84c 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.324 2009/02/12 03:00:56 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.325 2009/03/17 21:37:00 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -196,7 +196,7 @@ int
main(int ac, char **av)
{
int i, opt, exit_status, use_syslog;
- char *p, *cp, *line, buf[256];
+ char *p, *cp, *line, *argv0, buf[256];
struct stat st;
struct passwd *pw;
int dummy, timeout_ms;
@@ -257,6 +257,7 @@ main(int ac, char **av)
/* Parse command-line arguments. */
host = NULL;
use_syslog = 0;
+ argv0 = av[0];
again:
while ((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:p:qstvx"
@@ -587,7 +588,7 @@ main(int ac, char **av)
* Initialize "log" output. Since we are the client all output
* actually goes to stderr.
*/
- log_init(av[0],
+ log_init(argv0,
options.log_level == -1 ? SYSLOG_LEVEL_INFO : options.log_level,
SYSLOG_FACILITY_USER, !use_syslog);
@@ -615,7 +616,7 @@ main(int ac, char **av)
channel_set_af(options.address_family);
/* reinit */
- log_init(av[0], options.log_level, SYSLOG_FACILITY_USER, !use_syslog);
+ log_init(argv0, options.log_level, SYSLOG_FACILITY_USER, !use_syslog);
if (options.user == NULL)
options.user = xstrdup(pw->pw_name);