[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.51 and 1.52

version 1.51, 2003/08/26 09:58:43 version 1.52, 2003/08/28 12:54:34
Line 49 
Line 49 
         case SSH_CMSG_AUTH_TIS:          case SSH_CMSG_AUTH_TIS:
         case SSH_CMSG_AUTH_TIS_RESPONSE:          case SSH_CMSG_AUTH_TIS_RESPONSE:
                 return "challenge-response";                  return "challenge-response";
 #ifdef KRB5  
         case SSH_CMSG_AUTH_KERBEROS:  
                 return "kerberos";  
 #endif  
         }          }
         snprintf(buf, sizeof buf, "bad-auth-msg-%d", type);          snprintf(buf, sizeof buf, "bad-auth-msg-%d", type);
         return buf;          return buf;
Line 105 
Line 101 
   
                 /* Process the packet. */                  /* Process the packet. */
                 switch (type) {                  switch (type) {
   
 #ifdef KRB5  
                 case SSH_CMSG_AUTH_KERBEROS:  
                         if (!options.kerberos_authentication) {  
                                 verbose("Kerberos authentication disabled.");  
                         } else {  
                                 char *kdata = packet_get_string(&dlen);  
                                 packet_check_eom();  
   
                                 if (kdata[0] != 4) { /* KRB_PROT_VERSION */  
                                         krb5_data tkt, reply;  
                                         tkt.length = dlen;  
                                         tkt.data = kdata;  
   
                                         if (PRIVSEP(auth_krb5(authctxt, &tkt,  
                                             &client_user, &reply))) {  
                                                 authenticated = 1;  
                                                 snprintf(info, sizeof(info),  
                                                     " tktuser %.100s",  
                                                     client_user);  
   
                                                 /* Send response to client */  
                                                 packet_start(  
                                                     SSH_SMSG_AUTH_KERBEROS_RESPONSE);  
                                                 packet_put_string((char *)  
                                                     reply.data, reply.length);  
                                                 packet_send();  
                                                 packet_write_wait();  
   
                                                 if (reply.length)  
                                                         xfree(reply.data);  
                                                 xfree(client_user);  
                                         }  
                                 }  
                                 xfree(kdata);  
                         }  
                         break;  
                 case SSH_CMSG_HAVE_KERBEROS_TGT:  
                         packet_send_debug("Kerberos TGT passing disabled before authentication.");  
                         break;  
 #endif  
   
                 case SSH_CMSG_AUTH_RHOSTS_RSA:                  case SSH_CMSG_AUTH_RHOSTS_RSA:
                         if (!options.rhosts_rsa_authentication) {                          if (!options.rhosts_rsa_authentication) {
                                 verbose("Rhosts with RSA authentication disabled.");                                  verbose("Rhosts with RSA authentication disabled.");
Line 297 
Line 251 
   
         if ((style = strchr(user, ':')) != NULL)          if ((style = strchr(user, ':')) != NULL)
                 *style++ = '\0';                  *style++ = '\0';
   
 #ifdef KRB5  
         /* XXX - SSH.com Kerberos v5 braindeath. */  
         if ((datafellows & SSH_BUG_K5USER) &&  
             options.kerberos_authentication) {  
                 char *p;  
                 if ((p = strchr(user, '@')) != NULL)  
                         *p = '\0';  
         }  
 #endif  
   
         authctxt = authctxt_new();          authctxt = authctxt_new();
         authctxt->user = user;          authctxt->user = user;

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52