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

(-)a/configure.ac (+8 lines)
Lines 1448-1453 else Link Here
1448
	AC_MSG_RESULT([no])
1448
	AC_MSG_RESULT([no])
1449
fi
1449
fi
1450
1450
1451
AC_MSG_CHECKING([for /proc/self/exe link])
1452
if test -L "/proc/self/exe" ; then
1453
	AC_DEFINE([HAVE_PROC_SELF_EXE], [1], [Define if you have /proc/self/exe])
1454
	AC_MSG_RESULT([yes])
1455
else
1456
	AC_MSG_RESULT([no])
1457
fi
1458
1451
# Check whether user wants S/Key support
1459
# Check whether user wants S/Key support
1452
SKEY_MSG="no"
1460
SKEY_MSG="no"
1453
AC_ARG_WITH([skey],
1461
AC_ARG_WITH([skey],
(-)a/ssh.1 (+5 lines)
Lines 330-335 Multiple jump hops may be specified separated by comma characters. Link Here
330
This is a shortcut to specify a
330
This is a shortcut to specify a
331
.Cm ProxyJump
331
.Cm ProxyJump
332
configuration directive.
332
configuration directive.
333
When constructing the proxy command lines, the environment variable
334
.Ev SSH_CUSTOM_CMD
335
can be used to specify the
336
.Nm
337
binary to use.
333
.Pp
338
.Pp
334
.It Fl K
339
.It Fl K
335
Enables GSSAPI-based authentication and forwarding (delegation) of GSSAPI
340
Enables GSSAPI-based authentication and forwarding (delegation) of GSSAPI
(-)a/ssh.c (-2 / +16 lines)
Lines 1096-1101 main(int ac, char **av) Link Here
1096
	 */
1096
	 */
1097
	if (options.jump_host != NULL) {
1097
	if (options.jump_host != NULL) {
1098
		char port_s[8];
1098
		char port_s[8];
1099
#ifdef HAVE_PROC_SELF_EXE
1100
		char ssh_path[PATH_MAX];
1101
#endif
1102
		char *ssh_cmd = getenv("SSH_CUSTOM_CMD");
1103
		if (ssh_cmd && ssh_cmd[0] != '\0') {
1104
			debug("Using custom SSH command: '%s'", ssh_cmd);
1105
#ifdef HAVE_PROC_SELF_EXE
1106
		} else if (readlink("/proc/self/exe", ssh_path, PATH_MAX) != -1) {
1107
			debug("Located own ssh binary: '%s'", ssh_path);
1108
			ssh_cmd = ssh_path;
1109
#endif
1110
		} else {
1111
			ssh_cmd = "ssh";
1112
		}
1099
1113
1100
		/* Consistency check */
1114
		/* Consistency check */
1101
		if (options.proxy_command != NULL)
1115
		if (options.proxy_command != NULL)
Lines 1104-1110 main(int ac, char **av) Link Here
1104
		options.proxy_use_fdpass = 0;
1118
		options.proxy_use_fdpass = 0;
1105
		snprintf(port_s, sizeof(port_s), "%d", options.jump_port);
1119
		snprintf(port_s, sizeof(port_s), "%d", options.jump_port);
1106
		xasprintf(&options.proxy_command,
1120
		xasprintf(&options.proxy_command,
1107
		    "ssh%s%s%s%s%s%s%s%s%s%.*s -W %%h:%%p %s",
1121
		    "%s%s%s%s%s%s%s%s%s%s%.*s -W %%h:%%p %s",
1122
		    ssh_cmd,
1108
		    /* Optional "-l user" argument if jump_user set */
1123
		    /* Optional "-l user" argument if jump_user set */
1109
		    options.jump_user == NULL ? "" : " -l ",
1124
		    options.jump_user == NULL ? "" : " -l ",
1110
		    options.jump_user == NULL ? "" : options.jump_user,
1125
		    options.jump_user == NULL ? "" : options.jump_user,
1111
- 

Return to bug 2607