Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
Set cfg.ssh_simple in Windows Plink when there are no forwardings.
Browse files Browse the repository at this point in the history
Unix Plink had had this for ages, but for some reason I didn't add it to
Windows Plink at the same time.
  • Loading branch information
bjh21 committed Apr 15, 2016
1 parent 34add87 commit b22c0b6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion unix/uxplink.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ int main(int argc, char **argv)
uxsel_init();

/*
* Unix Plink doesn't provide any way to add forwardings after the
* Plink doesn't provide any way to add forwardings after the
* connection is set up, so if there are none now, we can safely set
* the "simple" flag.
*/
Expand Down
11 changes: 11 additions & 0 deletions windows/winplink.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,17 @@ int main(int argc, char **argv)
return 1;
}

/*
* Plink doesn't provide any way to add forwardings after the
* connection is set up, so if there are none now, we can safely set
* the "simple" flag.
*/
if (conf_get_int(conf, CONF_protocol) == PROT_SSH &&
!conf_get_int(conf, CONF_x11_forward) &&
!conf_get_int(conf, CONF_agentfwd) &&
!conf_get_str_nthstrkey(conf, CONF_portfwd, 0))
conf_set_int(conf, CONF_ssh_simple, TRUE);

logctx = log_init(NULL, conf);
console_provide_logctx(logctx);

Expand Down

0 comments on commit b22c0b6

Please sign in to comment.