summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/readconf.c b/readconf.c
index b9f1b7ddc..8b576a7ad 100644
--- a/readconf.c
+++ b/readconf.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: readconf.c,v 1.101 2002/11/07 22:08:07 markus Exp $"); 15RCSID("$OpenBSD: readconf.c,v 1.102 2003/02/05 09:02:28 markus Exp $");
16 16
17#include "ssh.h" 17#include "ssh.h"
18#include "xmalloc.h" 18#include "xmalloc.h"
@@ -268,14 +268,16 @@ parse_token(const char *cp, const char *filename, int linenum)
268 * Processes a single option line as used in the configuration files. This 268 * Processes a single option line as used in the configuration files. This
269 * only sets those values that have not already been set. 269 * only sets those values that have not already been set.
270 */ 270 */
271#define WHITESPACE " \t\r\n"
271 272
272int 273int
273process_config_line(Options *options, const char *host, 274process_config_line(Options *options, const char *host,
274 char *line, const char *filename, int linenum, 275 char *line, const char *filename, int linenum,
275 int *activep) 276 int *activep)
276{ 277{
277 char buf[256], *s, *string, **charptr, *endofnumber, *keyword, *arg; 278 char buf[256], *s, **charptr, *endofnumber, *keyword, *arg;
278 int opcode, *intptr, value; 279 int opcode, *intptr, value;
280 size_t len;
279 u_short fwd_port, fwd_host_port; 281 u_short fwd_port, fwd_host_port;
280 char sfwd_host_port[6]; 282 char sfwd_host_port[6];
281 283
@@ -488,16 +490,9 @@ parse_string:
488 490
489 case oProxyCommand: 491 case oProxyCommand:
490 charptr = &options->proxy_command; 492 charptr = &options->proxy_command;
491 string = xstrdup(""); 493 len = strspn(s, WHITESPACE "=");
492 while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
493 string = xrealloc(string, strlen(string) + strlen(arg) + 2);
494 strcat(string, " ");
495 strcat(string, arg);
496 }
497 if (*activep && *charptr == NULL) 494 if (*activep && *charptr == NULL)
498 *charptr = string; 495 *charptr = xstrdup(s + len);
499 else
500 xfree(string);
501 return 0; 496 return 0;
502 497
503 case oPort: 498 case oPort: