[BACK]Return to ssh.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/ssh.c between version 1.477 and 1.478

version 1.477, 2018/04/14 21:50:41 version 1.478, 2018/06/01 03:11:49
Line 1140 
Line 1140 
          */           */
         if (options.jump_host != NULL) {          if (options.jump_host != NULL) {
                 char port_s[8];                  char port_s[8];
                   const char *sshbin = argv0;
   
                   /*
                    * Try to use SSH indicated by argv[0], but fall back to
                    * "ssh" if it appears unavailable.
                    */
                   if (strchr(argv0, '/') != NULL && access(argv0, X_OK) != 0)
                           sshbin = "ssh";
   
                 /* Consistency check */                  /* Consistency check */
                 if (options.proxy_command != NULL)                  if (options.proxy_command != NULL)
                         fatal("inconsistent options: ProxyCommand+ProxyJump");                          fatal("inconsistent options: ProxyCommand+ProxyJump");
Line 1148 
Line 1156 
                 options.proxy_use_fdpass = 0;                  options.proxy_use_fdpass = 0;
                 snprintf(port_s, sizeof(port_s), "%d", options.jump_port);                  snprintf(port_s, sizeof(port_s), "%d", options.jump_port);
                 xasprintf(&options.proxy_command,                  xasprintf(&options.proxy_command,
                     "ssh%s%s%s%s%s%s%s%s%s%.*s -W '[%%h]:%%p' %s",                      "%s%s%s%s%s%s%s%s%s%s%.*s -W '[%%h]:%%p' %s",
                       sshbin,
                     /* Optional "-l user" argument if jump_user set */                      /* Optional "-l user" argument if jump_user set */
                     options.jump_user == NULL ? "" : " -l ",                      options.jump_user == NULL ? "" : " -l ",
                     options.jump_user == NULL ? "" : options.jump_user,                      options.jump_user == NULL ? "" : options.jump_user,

Legend:
Removed from v.1.477  
changed lines
  Added in v.1.478