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

(-)a/ssh.c (-1 / +10 lines)
Lines 1140-1145 main(int ac, char **av) Link Here
1140
	 */
1140
	 */
1141
	if (options.jump_host != NULL) {
1141
	if (options.jump_host != NULL) {
1142
		char port_s[8];
1142
		char port_s[8];
1143
		const char *sshbin = argv0;
1144
1145
		/*
1146
		 * Try to use SSH indicated by argv[0], but fall back to
1147
		 * "ssh" if it appears unavailable.
1148
		 */
1149
		if (strchr(argv0, '/') != NULL && access(argv0, X_OK) != 0)
1150
			sshbin = "ssh";
1143
1151
1144
		/* Consistency check */
1152
		/* Consistency check */
1145
		if (options.proxy_command != NULL)
1153
		if (options.proxy_command != NULL)
Lines 1148-1154 main(int ac, char **av) Link Here
1148
		options.proxy_use_fdpass = 0;
1156
		options.proxy_use_fdpass = 0;
1149
		snprintf(port_s, sizeof(port_s), "%d", options.jump_port);
1157
		snprintf(port_s, sizeof(port_s), "%d", options.jump_port);
1150
		xasprintf(&options.proxy_command,
1158
		xasprintf(&options.proxy_command,
1151
		    "ssh%s%s%s%s%s%s%s%s%s%.*s -W '[%%h]:%%p' %s",
1159
		    "%s%s%s%s%s%s%s%s%s%s%.*s -W '[%%h]:%%p' %s",
1160
		    sshbin,
1152
		    /* Optional "-l user" argument if jump_user set */
1161
		    /* Optional "-l user" argument if jump_user set */
1153
		    options.jump_user == NULL ? "" : " -l ",
1162
		    options.jump_user == NULL ? "" : " -l ",
1154
		    options.jump_user == NULL ? "" : options.jump_user,
1163
		    options.jump_user == NULL ? "" : options.jump_user,

Return to bug 2831