[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.15 and 1.16

version 1.15, 1999/10/06 04:22:20 version 1.16, 1999/10/06 20:07:42
Line 1449 
Line 1449 
       debug("Doing password authentication.");        debug("Doing password authentication.");
       if (options->cipher == SSH_CIPHER_NONE)        if (options->cipher == SSH_CIPHER_NONE)
         log("WARNING: Encryption is disabled! Password will be transmitted in clear text.");          log("WARNING: Encryption is disabled! Password will be transmitted in clear text.");
       password = read_passphrase(prompt, 0);        for (i = 0; i < options->number_of_password_prompts; i++) {
       packet_start(SSH_CMSG_AUTH_PASSWORD);          password = read_passphrase(prompt, 0);
       packet_put_string(password, strlen(password));          packet_start(SSH_CMSG_AUTH_PASSWORD);
       memset(password, 0, strlen(password));          packet_put_string(password, strlen(password));
       xfree(password);          memset(password, 0, strlen(password));
       packet_send();          xfree(password);
       packet_write_wait();          packet_send();
           packet_write_wait();
       type = packet_read(&payload_len);  
       if (type == SSH_SMSG_SUCCESS)          type = packet_read(&payload_len);
         return; /* Successful connection. */          if (type == SSH_SMSG_SUCCESS)
       if (type != SSH_SMSG_FAILURE)            return; /* Successful connection. */
         packet_disconnect("Protocol error: got %d in response to passwd auth",          if (type != SSH_SMSG_FAILURE)
                           type);            packet_disconnect("Protocol error: got %d in response to passwd auth", type);
         }
     }      }
   
   /* All authentication methods have failed.  Exit with an error message. */    /* All authentication methods have failed.  Exit with an error message. */

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16