version 1.533, 2020/07/17 03:43:42 |
version 1.534, 2020/07/31 04:19:37 |
|
|
/* Fill configuration defaults. */ |
/* Fill configuration defaults. */ |
fill_default_options(&options); |
fill_default_options(&options); |
|
|
|
if (options.user == NULL) |
|
options.user = xstrdup(pw->pw_name); |
|
|
/* |
/* |
* If ProxyJump option specified, then construct a ProxyCommand now. |
* If ProxyJump option specified, then construct a ProxyCommand now. |
*/ |
*/ |
if (options.jump_host != NULL) { |
if (options.jump_host != NULL) { |
char port_s[8]; |
char port_s[8]; |
const char *sshbin = argv0; |
const char *jumpuser = options.jump_user, *sshbin = argv0; |
int port = options.port, jumpport = options.jump_port; |
int port = options.port, jumpport = options.jump_port; |
|
|
if (port <= 0) |
if (port <= 0) |
port = default_ssh_port(); |
port = default_ssh_port(); |
if (jumpport <= 0) |
if (jumpport <= 0) |
jumpport = default_ssh_port(); |
jumpport = default_ssh_port(); |
if (strcmp(options.jump_host, host) == 0 && port == jumpport) |
if (jumpuser == NULL) |
|
jumpuser = options.user; |
|
if (strcmp(options.jump_host, host) == 0 && port == jumpport && |
|
strcmp(options.user, jumpuser) == 0) |
fatal("jumphost loop via %s", options.jump_host); |
fatal("jumphost loop via %s", options.jump_host); |
|
|
/* |
/* |
|
|
"stdin is not a terminal."); |
"stdin is not a terminal."); |
tty_flag = 0; |
tty_flag = 0; |
} |
} |
|
|
if (options.user == NULL) |
|
options.user = xstrdup(pw->pw_name); |
|
|
|
/* Set up strings used to percent_expand() arguments */ |
/* Set up strings used to percent_expand() arguments */ |
if (gethostname(thishost, sizeof(thishost)) == -1) |
if (gethostname(thishost, sizeof(thishost)) == -1) |