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

Diff for /src/usr.bin/ssh/monitor.c between version 1.2 and 1.3

version 1.2, 2002/03/19 10:35:39 version 1.3, 2002/03/19 10:41:32
Line 345 
Line 345 
   
                 if (pent != NULL)                  if (pent != NULL)
                         *pent = ent;                          *pent = ent;
   
                 return ret;                  return ret;
         }          }
   
         fatal("%s: unsupported request: %d\n", __FUNCTION__, type);          fatal("%s: unsupported request: %d\n", __FUNCTION__, type);
   
         /* NOTREACHED */          /* NOTREACHED */
         return (-1);          return (-1);
Line 411 
Line 411 
                 buffer_put_char(m, 1);                  buffer_put_char(m, 1);
                 buffer_put_bignum2(m, dh->p);                  buffer_put_bignum2(m, dh->p);
                 buffer_put_bignum2(m, dh->g);                  buffer_put_bignum2(m, dh->g);
   
                 DH_free(dh);                  DH_free(dh);
         }          }
         mm_request_send(socket, MONITOR_ANS_MODULI, m);          mm_request_send(socket, MONITOR_ANS_MODULI, m);
Line 426 
Line 426 
         u_char *signature;          u_char *signature;
         u_int siglen, datlen;          u_int siglen, datlen;
         int keyid;          int keyid;
   
         debug3("%s", __FUNCTION__);          debug3("%s", __FUNCTION__);
   
         keyid = buffer_get_int(m);          keyid = buffer_get_int(m);
         p = buffer_get_string(m, &datlen);          p = buffer_get_string(m, &datlen);
   
         if (datlen != 20)          if (datlen != 20)
                 fatal("%s: data length incorrect: %d", __FUNCTION__, datlen);                  fatal("%s: data length incorrect: %d", __FUNCTION__, datlen);
Line 464 
Line 464 
         char *login;          char *login;
         struct passwd *pwent;          struct passwd *pwent;
         int allowed = 0;          int allowed = 0;
   
         debug3("%s", __FUNCTION__);          debug3("%s", __FUNCTION__);
   
         if (authctxt->attempt++ != 0)          if (authctxt->attempt++ != 0)
Line 686 
Line 686 
         int allowed = 0;          int allowed = 0;
   
         debug3("%s entering", __FUNCTION__);          debug3("%s entering", __FUNCTION__);
   
         type = buffer_get_int(m);          type = buffer_get_int(m);
         cuser = buffer_get_string(m, NULL);          cuser = buffer_get_string(m, NULL);
         chost = buffer_get_string(m, NULL);          chost = buffer_get_string(m, NULL);
Line 760 
Line 760 
   
         buffer_init(&b);          buffer_init(&b);
         buffer_append(&b, data, datalen);          buffer_append(&b, data, datalen);
   
         if (datafellows & SSH_OLD_SESSIONID) {          if (datafellows & SSH_OLD_SESSIONID) {
                 buffer_consume(&b, session_id2_len);                  buffer_consume(&b, session_id2_len);
         } else {          } else {
Line 809 
Line 809 
   
         buffer_init(&b);          buffer_init(&b);
         buffer_append(&b, data, datalen);          buffer_append(&b, data, datalen);
   
         xfree(buffer_get_string(&b, &len));          xfree(buffer_get_string(&b, &len));
         if (len != session_id2_len)          if (len != session_id2_len)
                 fail++;                  fail++;
Line 896 
Line 896 
         xfree(data);          xfree(data);
   
         monitor_reset_key_state();          monitor_reset_key_state();
   
         buffer_clear(m);          buffer_clear(m);
         buffer_put_int(m, verified);          buffer_put_int(m, verified);
         mm_request_send(socket, MONITOR_ANS_KEYVERIFY, m);          mm_request_send(socket, MONITOR_ANS_KEYVERIFY, m);
Line 1074 
Line 1074 
 {  {
         BIGNUM *client_n;          BIGNUM *client_n;
         Key *key = NULL;          Key *key = NULL;
         u_char *blob = NULL;          u_char *blob = NULL;
         u_int blen = 0;          u_int blen = 0;
         int allowed = 0;          int allowed = 0;
   
         debug3("%s entering", __FUNCTION__);          debug3("%s entering", __FUNCTION__);
Line 1119 
Line 1119 
 mm_answer_rsa_challenge(int socket, Buffer *m)  mm_answer_rsa_challenge(int socket, Buffer *m)
 {  {
         Key *key = NULL;          Key *key = NULL;
         u_char *blob;          u_char *blob;
         u_int blen;          u_int blen;
   
         debug3("%s entering", __FUNCTION__);          debug3("%s entering", __FUNCTION__);
   
Line 1153 
Line 1153 
 mm_answer_rsa_response(int socket, Buffer *m)  mm_answer_rsa_response(int socket, Buffer *m)
 {  {
         Key *key = NULL;          Key *key = NULL;
         u_char *blob, *response;          u_char *blob, *response;
         u_int blen, len;          u_int blen, len;
         int success;          int success;
   
         debug3("%s entering", __FUNCTION__);          debug3("%s entering", __FUNCTION__);
   
Line 1242 
Line 1242 
             sizeof(incoming_stream));              sizeof(incoming_stream));
         memcpy(&outgoing_stream, &child_state.outgoing,          memcpy(&outgoing_stream, &child_state.outgoing,
             sizeof(outgoing_stream));              sizeof(outgoing_stream));
   
         /* Update with new address */          /* Update with new address */
         mm_init_compression(monitor->m_zlib);          mm_init_compression(monitor->m_zlib);
   
Line 1324 
Line 1324 
         blob = buffer_get_string(&m, &bloblen);          blob = buffer_get_string(&m, &bloblen);
         current_keys[MODE_IN] = mm_newkeys_from_blob(blob, bloblen);          current_keys[MODE_IN] = mm_newkeys_from_blob(blob, bloblen);
         xfree(blob);          xfree(blob);
   
         /* Now get sequence numbers for the packets */          /* Now get sequence numbers for the packets */
         packet_set_seqnr(MODE_OUT, buffer_get_int(&m));          packet_set_seqnr(MODE_OUT, buffer_get_int(&m));
         packet_set_seqnr(MODE_IN, buffer_get_int(&m));          packet_set_seqnr(MODE_IN, buffer_get_int(&m));
Line 1395 
Line 1395 
   
 static void  static void
 monitor_socketpair(int *pair)  monitor_socketpair(int *pair)
 {  {
         if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)          if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)
                 fatal("%s: socketpair", __FUNCTION__);                  fatal("%s: socketpair", __FUNCTION__);
         FD_CLOSEONEXEC(pair[0]);          FD_CLOSEONEXEC(pair[0]);

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3