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

Diff for /src/usr.bin/ssh/Attic/auth1.c between version 1.26 and 1.27

version 1.26, 2001/12/05 03:56:39 version 1.27, 2001/12/19 07:18:56
Line 77 
Line 77 
         struct passwd *pw = authctxt->pw;          struct passwd *pw = authctxt->pw;
   
         debug("Attempting authentication for %s%.100s.",          debug("Attempting authentication for %s%.100s.",
              authctxt->valid ? "" : "illegal user ", authctxt->user);              authctxt->valid ? "" : "illegal user ", authctxt->user);
   
         /* If the user has no password, accept authentication immediately. */          /* If the user has no password, accept authentication immediately. */
         if (options.password_authentication &&          if (options.password_authentication &&
Line 88 
Line 88 
                 auth_log(authctxt, 1, "without authentication", "");                  auth_log(authctxt, 1, "without authentication", "");
                 return;                  return;
         }          }
   
         /* Indicate that authentication is needed. */          /* Indicate that authentication is needed. */
         packet_start(SSH_SMSG_FAILURE);          packet_start(SSH_SMSG_FAILURE);
         packet_send();          packet_send();
Line 112 
Line 112 
                                 verbose("Kerberos authentication disabled.");                                  verbose("Kerberos authentication disabled.");
                         } else {                          } else {
                                 char *kdata = packet_get_string(&dlen);                                  char *kdata = packet_get_string(&dlen);
   
                                 packet_integrity_check(plen, 4 + dlen, type);                                  packet_integrity_check(plen, 4 + dlen, type);
   
                                 if (kdata[0] == 4) { /* KRB_PROT_VERSION */                                  if (kdata[0] == 4) { /* KRB_PROT_VERSION */
 #ifdef KRB4  #ifdef KRB4
                                         KTEXT_ST tkt;                                          KTEXT_ST tkt;
   
                                         tkt.length = dlen;                                          tkt.length = dlen;
                                         if (tkt.length < MAX_KTXT_LEN)                                          if (tkt.length < MAX_KTXT_LEN)
                                                 memcpy(tkt.dat, kdata, tkt.length);                                                  memcpy(tkt.dat, kdata, tkt.length);
   
                                         if (auth_krb4(authctxt, &tkt, &client_user)) {                                          if (auth_krb4(authctxt, &tkt, &client_user)) {
                                                 authenticated = 1;                                                  authenticated = 1;
                                                 snprintf(info, sizeof(info),                                                  snprintf(info, sizeof(info),
Line 136 
Line 136 
                                         krb5_data tkt;                                          krb5_data tkt;
                                         tkt.length = dlen;                                          tkt.length = dlen;
                                         tkt.data = kdata;                                          tkt.data = kdata;
   
                                         if (auth_krb5(authctxt, &tkt, &client_user)) {                                          if (auth_krb5(authctxt, &tkt, &client_user)) {
                                                 authenticated = 1;                                                  authenticated = 1;
                                                 snprintf(info, sizeof(info),                                                  snprintf(info, sizeof(info),
Line 150 
Line 150 
                         }                          }
                         break;                          break;
 #endif /* KRB4 || KRB5 */  #endif /* KRB4 || KRB5 */
   
 #if defined(AFS) || defined(KRB5)  #if defined(AFS) || defined(KRB5)
                         /* XXX - punt on backward compatibility here. */                          /* XXX - punt on backward compatibility here. */
                 case SSH_CMSG_HAVE_KERBEROS_TGT:                  case SSH_CMSG_HAVE_KERBEROS_TGT:
Line 162 
Line 162 
                         break;                          break;
 #endif /* AFS */  #endif /* AFS */
 #endif /* AFS || KRB5 */  #endif /* AFS || KRB5 */
   
                 case SSH_CMSG_AUTH_RHOSTS:                  case SSH_CMSG_AUTH_RHOSTS:
                         if (!options.rhosts_authentication) {                          if (!options.rhosts_authentication) {
                                 verbose("Rhosts authentication disabled.");                                  verbose("Rhosts authentication disabled.");
Line 344 
Line 344 
         /* XXX - SSH.com Kerberos v5 braindeath. */          /* XXX - SSH.com Kerberos v5 braindeath. */
         if ((p = strchr(user, '@')) != NULL)          if ((p = strchr(user, '@')) != NULL)
                 *p = '\0';                  *p = '\0';
   
         authctxt = authctxt_new();          authctxt = authctxt_new();
         authctxt->user = user;          authctxt->user = user;
         authctxt->style = style;          authctxt->style = style;

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27