summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/ssh.c b/ssh.c
index 2c589de82..720604394 100644
--- a/ssh.c
+++ b/ssh.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: ssh.c,v 1.186 2002/09/19 01:58:18 djm Exp $"); 43RCSID("$OpenBSD: ssh.c,v 1.190 2003/02/06 09:27:29 markus Exp $");
44 44
45#include <openssl/evp.h> 45#include <openssl/evp.h>
46#include <openssl/err.h> 46#include <openssl/err.h>
@@ -495,9 +495,9 @@ again:
495 av += optind; 495 av += optind;
496 496
497 if (ac > 0 && !host && **av != '-') { 497 if (ac > 0 && !host && **av != '-') {
498 if (strchr(*av, '@')) { 498 if (strrchr(*av, '@')) {
499 p = xstrdup(*av); 499 p = xstrdup(*av);
500 cp = strchr(p, '@'); 500 cp = strrchr(p, '@');
501 if (cp == NULL || cp == p) 501 if (cp == NULL || cp == p)
502 usage(); 502 usage();
503 options.user = p; 503 options.user = p;
@@ -505,12 +505,11 @@ again:
505 host = ++cp; 505 host = ++cp;
506 } else 506 } else
507 host = *av; 507 host = *av;
508 ac--, av++; 508 if (ac > 1) {
509 if (ac > 0) { 509 optind = optreset = 1;
510 optind = 0;
511 optreset = 1;
512 goto again; 510 goto again;
513 } 511 }
512 ac--, av++;
514 } 513 }
515 514
516 /* Check that we got a host name. */ 515 /* Check that we got a host name. */
@@ -602,6 +601,10 @@ again:
602 if (options.hostname != NULL) 601 if (options.hostname != NULL)
603 host = options.hostname; 602 host = options.hostname;
604 603
604 if (options.proxy_command != NULL &&
605 strcmp(options.proxy_command, "none") == 0)
606 options.proxy_command = NULL;
607
605 /* Disable rhosts authentication if not running as root. */ 608 /* Disable rhosts authentication if not running as root. */
606#ifdef HAVE_CYGWIN 609#ifdef HAVE_CYGWIN
607 /* Ignore uid if running under Windows */ 610 /* Ignore uid if running under Windows */
@@ -1026,7 +1029,7 @@ ssh_session2_setup(int id, void *arg)
1026 int interactive = 0; 1029 int interactive = 0;
1027 struct termios tio; 1030 struct termios tio;
1028 1031
1029 debug("ssh_session2_setup: id %d", id); 1032 debug2("ssh_session2_setup: id %d", id);
1030 1033
1031 if (tty_flag) { 1034 if (tty_flag) {
1032 struct winsize ws; 1035 struct winsize ws;