|
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 |
- |
|
|