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

Diff for /src/usr.bin/ssh/sshconnect.c between version 1.275 and 1.276

version 1.275, 2017/04/30 23:11:45 version 1.276, 2017/04/30 23:13:25
Line 514 
Line 514 
 send_client_banner(int connection_out, int minor1)  send_client_banner(int connection_out, int minor1)
 {  {
         /* Send our own protocol version identification. */          /* Send our own protocol version identification. */
         if (compat20) {          xasprintf(&client_version_string, "SSH-%d.%d-%.100s\r\n",
                 xasprintf(&client_version_string, "SSH-%d.%d-%.100s\r\n",              PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION);
                     PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION);  
         } else {  
                 xasprintf(&client_version_string, "SSH-%d.%d-%.100s\n",  
                     PROTOCOL_MAJOR_1, minor1, SSH_VERSION);  
         }  
         if (atomicio(vwrite, connection_out, client_version_string,          if (atomicio(vwrite, connection_out, client_version_string,
             strlen(client_version_string)) != strlen(client_version_string))              strlen(client_version_string)) != strlen(client_version_string))
                 fatal("write: %.100s", strerror(errno));                  fatal("write: %.100s", strerror(errno));
Line 549 
Line 544 
         fdsetsz = howmany(connection_in + 1, NFDBITS) * sizeof(fd_mask);          fdsetsz = howmany(connection_in + 1, NFDBITS) * sizeof(fd_mask);
         fdset = xcalloc(1, fdsetsz);          fdset = xcalloc(1, fdsetsz);
   
         enable_compat20();  
         send_client_banner(connection_out, 0);          send_client_banner(connection_out, 0);
         client_banner_sent = 1;          client_banner_sent = 1;
   
Line 618 
Line 612 
         mismatch = 0;          mismatch = 0;
   
         switch (remote_major) {          switch (remote_major) {
           case 2:
                   break;
         case 1:          case 1:
                 if (remote_minor == 99)                  if (remote_minor != 99)
                         enable_compat20();  
                 else  
                         mismatch = 1;                          mismatch = 1;
                 break;                  break;
         case 2:  
                 enable_compat20();  
                 break;  
         default:          default:
                 mismatch = 1;                  mismatch = 1;
                 break;                  break;
Line 1217 
Line 1208 
                             host_key->cert->principals[i]);                              host_key->cert->principals[i]);
                 }                  }
         } else {          } else {
                 debug("Server host key: %s %s", compat20 ?                  debug("Server host key: %s %s", sshkey_ssh_name(host_key), fp);
                     sshkey_ssh_name(host_key) : sshkey_type(host_key), fp);  
         }          }
   
         if (sshkey_equal(previous_host_key, host_key)) {          if (sshkey_equal(previous_host_key, host_key)) {
Line 1323 
Line 1313 
         /* key exchange */          /* key exchange */
         /* authenticate user */          /* authenticate user */
         debug("Authenticating to %s:%d as '%s'", host, port, server_user);          debug("Authenticating to %s:%d as '%s'", host, port, server_user);
         if (compat20) {          ssh_kex2(host, hostaddr, port);
                 ssh_kex2(host, hostaddr, port);          ssh_userauth2(local_user, server_user, host, sensitive);
                 ssh_userauth2(local_user, server_user, host, sensitive);  
         } else {  
                 fatal("ssh1 is not supported");  
         }  
         free(local_user);          free(local_user);
 }  }
   

Legend:
Removed from v.1.275  
changed lines
  Added in v.1.276