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

Diff for /src/usr.bin/ssh/sshconnect2.c between version 1.27.2.6 and 1.27.2.7

version 1.27.2.6, 2001/11/15 00:15:00 version 1.27.2.7, 2001/11/15 22:50:30
Line 460 
Line 460 
         packet_put_cstring(password);          packet_put_cstring(password);
         memset(password, 0, strlen(password));          memset(password, 0, strlen(password));
         xfree(password);          xfree(password);
         packet_inject_ignore(64);          packet_add_padding(64);
         packet_send();          packet_send();
         return 1;          return 1;
 }  }
Line 817 
Line 817 
         }          }
         packet_done(); /* done with parsing incoming message. */          packet_done(); /* done with parsing incoming message. */
   
         packet_inject_ignore(64);          packet_add_padding(64);
         packet_send();          packet_send();
 }  }
   
Line 836 
Line 836 
         u_int blen, slen;          u_int blen, slen;
         int ok, i, len, found = 0;          int ok, i, len, found = 0;
   
         p = get_local_name(packet_get_connection_in());  
         if (p == NULL) {  
                 error("userauth_hostbased: cannot get local ipaddr/name");  
                 return 0;  
         }  
         len = strlen(p) + 2;  
         chost = xmalloc(len);  
         strlcpy(chost, p, len);  
         strlcat(chost, ".", len);  
         debug2("userauth_hostbased: chost %s", chost);  
         /* check for a useful key */          /* check for a useful key */
         for (i = 0; i < authctxt->nkeys; i++) {          for (i = 0; i < authctxt->nkeys; i++) {
                 private = authctxt->keys[i];                  private = authctxt->keys[i];
Line 857 
Line 847 
                 }                  }
         }          }
         if (!found) {          if (!found) {
                 xfree(chost);                  debug("userauth_hostbased: no more client hostkeys");
                 return 0;                  return 0;
         }          }
         if (key_to_blob(private, &blob, &blen) == 0) {          if (key_to_blob(private, &blob, &blen) == 0) {
                 key_free(private);                  key_free(private);
                 xfree(chost);  
                 return 0;                  return 0;
         }          }
           /* figure out a name for the client host */
           p = get_local_name(packet_get_connection_in());
           if (p == NULL) {
                   error("userauth_hostbased: cannot get local ipaddr/name");
                   key_free(private);
                   return 0;
           }
           len = strlen(p) + 2;
           chost = xmalloc(len);
           strlcpy(chost, p, len);
           strlcat(chost, ".", len);
           debug2("userauth_hostbased: chost %s", chost);
   
         service = datafellows & SSH_BUG_HBSERVICE ? "ssh-userauth" :          service = datafellows & SSH_BUG_HBSERVICE ? "ssh-userauth" :
             authctxt->service;              authctxt->service;
         pkalg = xstrdup(key_ssh_name(private));          pkalg = xstrdup(key_ssh_name(private));
Line 882 
Line 884 
 #ifdef DEBUG_PK  #ifdef DEBUG_PK
         buffer_dump(&b);          buffer_dump(&b);
 #endif  #endif
         debug2("xxx: chost %s", chost);  
         ok = key_sign(private, &signature, &slen, buffer_ptr(&b), buffer_len(&b));          ok = key_sign(private, &signature, &slen, buffer_ptr(&b), buffer_len(&b));
         key_free(private);          key_free(private);
         buffer_free(&b);          buffer_free(&b);

Legend:
Removed from v.1.27.2.6  
changed lines
  Added in v.1.27.2.7