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

Diff for /src/usr.bin/ssh/sshd.c between version 1.302.2.1 and 1.302.2.2

version 1.302.2.1, 2005/03/10 16:28:28 version 1.302.2.2, 2005/09/02 03:45:01
Line 353 
Line 353 
 static void  static void
 sshd_exchange_identification(int sock_in, int sock_out)  sshd_exchange_identification(int sock_in, int sock_out)
 {  {
         int i, mismatch;          u_int i;
           int mismatch;
         int remote_major, remote_minor;          int remote_major, remote_minor;
         int major, minor;          int major, minor;
         char *s;          char *s;
Line 661 
Line 662 
   
         /* It is safe now to apply the key state */          /* It is safe now to apply the key state */
         monitor_apply_keystate(pmonitor);          monitor_apply_keystate(pmonitor);
   
           /*
            * Tell the packet layer that authentication was successful, since
            * this information is not part of the key state.
            */
           packet_set_authenticated();
 }  }
   
 static char *  static char *
Line 1545 
Line 1552 
         signal(SIGQUIT, SIG_DFL);          signal(SIGQUIT, SIG_DFL);
         signal(SIGCHLD, SIG_DFL);          signal(SIGCHLD, SIG_DFL);
   
         /* Set SO_KEEPALIVE if requested. */  
         if (options.tcp_keep_alive &&  
             setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, &on,  
             sizeof(on)) < 0)  
                 error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));  
   
         /*          /*
          * Register our connection.  This turns encryption off because we do           * Register our connection.  This turns encryption off because we do
          * not have a key.           * not have a key.
          */           */
         packet_set_connection(sock_in, sock_out);          packet_set_connection(sock_in, sock_out);
           packet_set_server();
   
         remote_port = get_remote_port();          /* Set SO_KEEPALIVE if requested. */
           if (options.tcp_keep_alive && packet_connection_is_on_socket() &&
               setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)) < 0)
                   error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));
   
           if ((remote_port = get_remote_port()) < 0) {
                   debug("get_remote_port failed");
                   cleanup_exit(255);
           }
         remote_ip = get_remote_ipaddr();          remote_ip = get_remote_ipaddr();
   
 #ifdef LIBWRAP  #ifdef LIBWRAP
Line 1809 
Line 1819 
         if (!rsafail) {          if (!rsafail) {
                 BN_mask_bits(session_key_int, sizeof(session_key) * 8);                  BN_mask_bits(session_key_int, sizeof(session_key) * 8);
                 len = BN_num_bytes(session_key_int);                  len = BN_num_bytes(session_key_int);
                 if (len < 0 || len > sizeof(session_key)) {                  if (len < 0 || (u_int)len > sizeof(session_key)) {
                         error("do_connection: bad session key len from %s: "                          error("do_connection: bad session key len from %s: "
                             "session_key_int %d > sizeof(session_key) %lu",                              "session_key_int %d > sizeof(session_key) %lu",
                             get_remote_ipaddr(), len, (u_long)sizeof(session_key));                              get_remote_ipaddr(), len, (u_long)sizeof(session_key));
Line 1896 
Line 1906 
                 myproposal[PROPOSAL_MAC_ALGS_CTOS] =                  myproposal[PROPOSAL_MAC_ALGS_CTOS] =
                 myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs;                  myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs;
         }          }
         if (!options.compression) {          if (options.compression == COMP_NONE) {
                 myproposal[PROPOSAL_COMP_ALGS_CTOS] =                  myproposal[PROPOSAL_COMP_ALGS_CTOS] =
                 myproposal[PROPOSAL_COMP_ALGS_STOC] = "none";                  myproposal[PROPOSAL_COMP_ALGS_STOC] = "none";
           } else if (options.compression == COMP_DELAYED) {
                   myproposal[PROPOSAL_COMP_ALGS_CTOS] =
                   myproposal[PROPOSAL_COMP_ALGS_STOC] = "none,zlib@openssh.com";
         }          }
   
         myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types();          myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types();
   
         /* start key exchange */          /* start key exchange */

Legend:
Removed from v.1.302.2.1  
changed lines
  Added in v.1.302.2.2