View | Details | Raw Unified | Return to bug 2869
Collapse All | Expand All

(-)a/readconf.c (-8 / +21 lines)
Lines 2055-2060 fill_default_options(Options * options) Link Here
2055
	CLEAR_ON_NONE(options->proxy_command);
2055
	CLEAR_ON_NONE(options->proxy_command);
2056
	CLEAR_ON_NONE(options->control_path);
2056
	CLEAR_ON_NONE(options->control_path);
2057
	CLEAR_ON_NONE(options->revoked_host_keys);
2057
	CLEAR_ON_NONE(options->revoked_host_keys);
2058
	if (options->jump_host != NULL &&
2059
	    strcmp(options->jump_host, "none") == 0 &&
2060
	    options->jump_port == 0 && options->jump_user == NULL) {
2061
		free(options->jump_host);
2062
		options->jump_host = NULL;
2063
	}
2058
	/* options->identity_agent distinguishes NULL from 'none' */
2064
	/* options->identity_agent distinguishes NULL from 'none' */
2059
	/* options->user will be set in the main program if appropriate */
2065
	/* options->user will be set in the main program if appropriate */
2060
	/* options->hostname will be set in the main program if appropriate */
2066
	/* options->hostname will be set in the main program if appropriate */
Lines 2283-2288 parse_jump(const char *s, Options *o, int active) Link Here
2283
	orig = sdup = xstrdup(s);
2289
	orig = sdup = xstrdup(s);
2284
	first = active;
2290
	first = active;
2285
	do {
2291
	do {
2292
		if (strcasecmp(s, "none") == 0)
2293
			break;
2286
		if ((cp = strrchr(sdup, ',')) == NULL)
2294
		if ((cp = strrchr(sdup, ',')) == NULL)
2287
			cp = sdup; /* last */
2295
			cp = sdup; /* last */
2288
		else
2296
		else
Lines 2303-2316 parse_jump(const char *s, Options *o, int active) Link Here
2303
	} while (cp != sdup);
2311
	} while (cp != sdup);
2304
	/* success */
2312
	/* success */
2305
	if (active) {
2313
	if (active) {
2306
		o->jump_user = user;
2314
		if (strcasecmp(s, "none") == 0) {
2307
		o->jump_host = host;
2315
			o->jump_host = xstrdup("none");
2308
		o->jump_port = port;
2316
			o->jump_port = 0;
2309
		o->proxy_command = xstrdup("none");
2317
		} else {
2310
		user = host = NULL;
2318
			o->jump_user = user;
2311
		if ((cp = strrchr(s, ',')) != NULL && cp != s) {
2319
			o->jump_host = host;
2312
			o->jump_extra = xstrdup(s);
2320
			o->jump_port = port;
2313
			o->jump_extra[cp - s] = '\0';
2321
			o->proxy_command = xstrdup("none");
2322
			user = host = NULL;
2323
			if ((cp = strrchr(s, ',')) != NULL && cp != s) {
2324
				o->jump_extra = xstrdup(s);
2325
				o->jump_extra[cp - s] = '\0';
2326
			}
2314
		}
2327
		}
2315
	}
2328
	}
2316
	ret = 0;
2329
	ret = 0;

Return to bug 2869