summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2003-12-09 17:30:05 +0000
committermarkus <markus@openbsd.org>2003-12-09 17:30:05 +0000
commitb6b0c392fc62051218e902f4b93497e8b08225f3 (patch)
tree28822554d1dccf43326949af99e7b7a2a35610e9 /usr.bin/ssh/ssh.c
parentfix -o and HUP; ok henning@ (diff)
downloadwireguard-openbsd-b6b0c392fc62051218e902f4b93497e8b08225f3.tar.xz
wireguard-openbsd-b6b0c392fc62051218e902f4b93497e8b08225f3.zip
don't modify argv for ssh -o; similar to sshd.c 1.283
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index a2934ded6c4..4ed4d71be90 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.204 2003/11/24 00:16:35 dtucker Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.205 2003/12/09 17:30:05 markus Exp $");
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -201,7 +201,7 @@ main(int ac, char **av)
int i, opt, exit_status;
u_short fwd_port, fwd_host_port;
char sfwd_port[6], sfwd_host_port[6];
- char *p, *cp, buf[256];
+ char *p, *cp, *line, buf[256];
struct stat st;
struct passwd *pw;
int dummy;
@@ -455,9 +455,11 @@ again:
break;
case 'o':
dummy = 1;
+ line = xstrdup(optarg);
if (process_config_line(&options, host ? host : "",
- optarg, "command-line", 0, &dummy) != 0)
+ line, "command-line", 0, &dummy) != 0)
exit(1);
+ xfree(line);
break;
case 's':
subsystem_flag = 1;