[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.545 and 1.546

version 1.545, 2020/12/20 23:38:00 version 1.546, 2020/12/20 23:40:19
Line 211 
Line 211 
         }          }
 }  }
   
 #define DEFAULT_CLIENT_PERCENT_EXPAND_ARGS \  
     "C", cinfo->conn_hash_hex, \  
     "L", cinfo->shorthost, \  
     "i", cinfo->uidstr, \  
     "k", cinfo->keyalias, \  
     "l", cinfo->thishost, \  
     "n", cinfo->host_arg, \  
     "p", cinfo->portstr  
   
 /*  /*
  * Expands the set of percent_expand options used by the majority of keywords   * Expands the set of percent_expand options used by the majority of keywords
  * in the client that support percent expansion.   * in the client that support percent expansion.
Line 230 
Line 221 
     const struct ssh_conn_info *cinfo)      const struct ssh_conn_info *cinfo)
 {  {
         return percent_expand(str,          return percent_expand(str,
             /* values from statics above */              DEFAULT_CLIENT_PERCENT_EXPAND_ARGS(cinfo),
             DEFAULT_CLIENT_PERCENT_EXPAND_ARGS,  
             /* values from arguments */  
             "d", cinfo->homedir,  
             "h", cinfo->remhost,  
             "r", cinfo->remuser,  
             "u", cinfo->locuser,  
             (char *)NULL);              (char *)NULL);
 }  }
   
Line 252 
Line 237 
         char *ret;          char *ret;
   
         ret = percent_dollar_expand(str,          ret = percent_dollar_expand(str,
             /* values from statics above */              DEFAULT_CLIENT_PERCENT_EXPAND_ARGS(cinfo),
             DEFAULT_CLIENT_PERCENT_EXPAND_ARGS,  
             /* values from arguments */  
             "d", cinfo->homedir,  
             "h", cinfo->remhost,  
             "r", cinfo->remuser,  
             "u", cinfo->locuser,  
             (char *)NULL);              (char *)NULL);
         if (ret == NULL)          if (ret == NULL)
                 fatal("invalid environment variable expansion");                  fatal("invalid environment variable expansion");
Line 1649 
Line 1628 
   
         /* Log into the remote system.  Never returns if the login fails. */          /* Log into the remote system.  Never returns if the login fails. */
         ssh_login(ssh, &sensitive_data, host, (struct sockaddr *)&hostaddr,          ssh_login(ssh, &sensitive_data, host, (struct sockaddr *)&hostaddr,
             options.port, pw, timeout_ms);              options.port, pw, timeout_ms, cinfo);
   
         if (ssh_packet_connection_is_on_socket(ssh)) {          if (ssh_packet_connection_is_on_socket(ssh)) {
                 verbose("Authenticated to %s ([%s]:%d).", host,                  verbose("Authenticated to %s ([%s]:%d).", host,
Line 2067 
Line 2046 
                 debug3("expanding LocalCommand: %s", options.local_command);                  debug3("expanding LocalCommand: %s", options.local_command);
                 cp = options.local_command;                  cp = options.local_command;
                 options.local_command = percent_expand(cp,                  options.local_command = percent_expand(cp,
                     DEFAULT_CLIENT_PERCENT_EXPAND_ARGS,                      DEFAULT_CLIENT_PERCENT_EXPAND_ARGS(cinfo),
                     "d", cinfo->homedir,  
                     "h", cinfo->remhost,  
                     "r", cinfo->remuser,  
                     "u", cinfo->locuser,  
                     "T", tun_fwd_ifname == NULL ? "NONE" : tun_fwd_ifname,                      "T", tun_fwd_ifname == NULL ? "NONE" : tun_fwd_ifname,
                     (char *)NULL);                      (char *)NULL);
                 debug3("expanded LocalCommand: %s", options.local_command);                  debug3("expanded LocalCommand: %s", options.local_command);

Legend:
Removed from v.1.545  
changed lines
  Added in v.1.546