]> andersk Git - gssapi-openssh.git/blobdiff - openssh/ssh.c
merge with OpenSSH 3.6.1p1
[gssapi-openssh.git] / openssh / ssh.c
index 82e8801665c20ffceafaf4ddbb832965c00353d9..ebf93dab85d5ea468d6640ccfb7d4de7c94d6502 100644 (file)
@@ -40,7 +40,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.186 2002/09/19 01:58:18 djm Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.190 2003/02/06 09:27:29 markus Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/err.h>
@@ -495,9 +495,9 @@ again:
        av += optind;
 
        if (ac > 0 && !host && **av != '-') {
-               if (strchr(*av, '@')) {
+               if (strrchr(*av, '@')) {
                        p = xstrdup(*av);
-                       cp = strchr(p, '@');
+                       cp = strrchr(p, '@');
                        if (cp == NULL || cp == p)
                                usage();
                        options.user = p;
@@ -505,12 +505,11 @@ again:
                        host = ++cp;
                } else
                        host = *av;
-               ac--, av++;
-               if (ac > 0) {
-                       optind = 0;
-                       optreset = 1;
+               if (ac > 1) {
+                       optind = optreset = 1;
                        goto again;
                }
+               ac--, av++;
        }
 
        /* Check that we got a host name. */
@@ -633,6 +632,10 @@ again:
        if (options.hostname != NULL)
                host = options.hostname;
 
+       if (options.proxy_command != NULL &&
+           strcmp(options.proxy_command, "none") == 0)
+               options.proxy_command = NULL;
+
        /* Disable rhosts authentication if not running as root. */
 #ifdef HAVE_CYGWIN
        /* Ignore uid if running under Windows */
@@ -1057,7 +1060,7 @@ ssh_session2_setup(int id, void *arg)
        int interactive = 0;
        struct termios tio;
 
-       debug("ssh_session2_setup: id %d", id);
+       debug2("ssh_session2_setup: id %d", id);
 
        if (tty_flag) {
                struct winsize ws;
This page took 0.448083 seconds and 4 git commands to generate.