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 24e541bc6..d9611848d 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>
@@ -500,9 +500,9 @@ again:
500 av += optind; 500 av += optind;
501 501
502 if (ac > 0 && !host && **av != '-') { 502 if (ac > 0 && !host && **av != '-') {
503 if (strchr(*av, '@')) { 503 if (strrchr(*av, '@')) {
504 p = xstrdup(*av); 504 p = xstrdup(*av);
505 cp = strchr(p, '@'); 505 cp = strrchr(p, '@');
506 if (cp == NULL || cp == p) 506 if (cp == NULL || cp == p)
507 usage(); 507 usage();
508 options.user = p; 508 options.user = p;
@@ -510,12 +510,11 @@ again:
510 host = ++cp; 510 host = ++cp;
511 } else 511 } else
512 host = *av; 512 host = *av;
513 ac--, av++; 513 if (ac > 1) {
514 if (ac > 0) { 514 optind = optreset = 1;
515 optind = 0;
516 optreset = 1;
517 goto again; 515 goto again;
518 } 516 }
517 ac--, av++;
519 } 518 }
520 519
521 /* Check that we got a host name. */ 520 /* Check that we got a host name. */
@@ -607,6 +606,10 @@ again:
607 if (options.hostname != NULL) 606 if (options.hostname != NULL)
608 host = options.hostname; 607 host = options.hostname;
609 608
609 if (options.proxy_command != NULL &&
610 strcmp(options.proxy_command, "none") == 0)
611 options.proxy_command = NULL;
612
610 /* Disable rhosts authentication if not running as root. */ 613 /* Disable rhosts authentication if not running as root. */
611#ifdef HAVE_CYGWIN 614#ifdef HAVE_CYGWIN
612 /* Ignore uid if running under Windows */ 615 /* Ignore uid if running under Windows */
@@ -1031,7 +1034,7 @@ ssh_session2_setup(int id, void *arg)
1031 int interactive = 0; 1034 int interactive = 0;
1032 struct termios tio; 1035 struct termios tio;
1033 1036
1034 debug("ssh_session2_setup: id %d", id); 1037 debug2("ssh_session2_setup: id %d", id);
1035 1038
1036 if (tty_flag) { 1039 if (tty_flag) {
1037 struct winsize ws; 1040 struct winsize ws;