[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.582 and 1.583

version 1.582, 2023/01/06 02:39:59 version 1.583, 2023/01/13 02:58:20
Line 616 
Line 616 
         struct ssh *ssh = NULL;          struct ssh *ssh = NULL;
         int i, r, opt, exit_status, use_syslog, direct, timeout_ms;          int i, r, opt, exit_status, use_syslog, direct, timeout_ms;
         int was_addr, config_test = 0, opt_terminated = 0, want_final_pass = 0;          int was_addr, config_test = 0, opt_terminated = 0, want_final_pass = 0;
         char *p, *cp, *line, *argv0, *logfile, *host_arg;          char *p, *cp, *line, *argv0, *logfile;
         char cname[NI_MAXHOST], thishost[NI_MAXHOST];          char cname[NI_MAXHOST], thishost[NI_MAXHOST];
         struct stat st;          struct stat st;
         struct passwd *pw;          struct passwd *pw;
Line 1083 
Line 1083 
         if (!host)          if (!host)
                 usage();                  usage();
   
         host_arg = xstrdup(host);          options.host_arg = xstrdup(host);
   
 #ifdef WITH_OPENSSL  #ifdef WITH_OPENSSL
         OpenSSL_add_all_algorithms();          OpenSSL_add_all_algorithms();
Line 1136 
Line 1136 
                 logit("%s, %s", SSH_VERSION, SSH_OPENSSL_VERSION);                  logit("%s, %s", SSH_VERSION, SSH_OPENSSL_VERSION);
   
         /* Parse the configuration files */          /* Parse the configuration files */
         process_config_files(host_arg, pw, 0, &want_final_pass);          process_config_files(options.host_arg, pw, 0, &want_final_pass);
         if (want_final_pass)          if (want_final_pass)
                 debug("configuration requests final Match pass");                  debug("configuration requests final Match pass");
   
Line 1205 
Line 1205 
                 debug("re-parsing configuration");                  debug("re-parsing configuration");
                 free(options.hostname);                  free(options.hostname);
                 options.hostname = xstrdup(host);                  options.hostname = xstrdup(host);
                 process_config_files(host_arg, pw, 1, NULL);                  process_config_files(options.host_arg, pw, 1, NULL);
                 /*                  /*
                  * Address resolution happens early with canonicalisation                   * Address resolution happens early with canonicalisation
                  * enabled and the port number may have changed since, so                   * enabled and the port number may have changed since, so
Line 1358 
Line 1358 
         xasprintf(&cinfo->uidstr, "%llu",          xasprintf(&cinfo->uidstr, "%llu",
             (unsigned long long)pw->pw_uid);              (unsigned long long)pw->pw_uid);
         cinfo->keyalias = xstrdup(options.host_key_alias ?          cinfo->keyalias = xstrdup(options.host_key_alias ?
             options.host_key_alias : host_arg);              options.host_key_alias : options.host_arg);
         cinfo->conn_hash_hex = ssh_connection_hash(cinfo->thishost, host,          cinfo->conn_hash_hex = ssh_connection_hash(cinfo->thishost, host,
             cinfo->portstr, options.user);              cinfo->portstr, options.user);
         cinfo->host_arg = xstrdup(host_arg);          cinfo->host_arg = xstrdup(options.host_arg);
         cinfo->remhost = xstrdup(host);          cinfo->remhost = xstrdup(host);
         cinfo->remuser = xstrdup(options.user);          cinfo->remuser = xstrdup(options.user);
         cinfo->homedir = xstrdup(pw->pw_dir);          cinfo->homedir = xstrdup(pw->pw_dir);
Line 1538 
Line 1538 
                 timeout_ms = options.connection_timeout * 1000;                  timeout_ms = options.connection_timeout * 1000;
   
         /* Open a connection to the remote host. */          /* Open a connection to the remote host. */
         if (ssh_connect(ssh, host, host_arg, addrs, &hostaddr, options.port,          if (ssh_connect(ssh, host, options.host_arg, addrs, &hostaddr,
             options.connection_attempts,              options.port, options.connection_attempts,
             &timeout_ms, options.tcp_keep_alive) != 0)              &timeout_ms, options.tcp_keep_alive) != 0)
                 exit(255);                  exit(255);
   

Legend:
Removed from v.1.582  
changed lines
  Added in v.1.583