[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.48 and 1.49

version 1.48, 2003/04/08 20:21:28 version 1.49, 2003/07/22 13:35:22
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";
 #if defined(KRB4) || defined(KRB5)  #ifdef KRB5
         case SSH_CMSG_AUTH_KERBEROS:          case SSH_CMSG_AUTH_KERBEROS:
                 return "kerberos";                  return "kerberos";
 #endif  #endif
Line 81 
Line 81 
   
         /* 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 &&
 #if defined(KRB4) || defined(KRB5)  #ifdef KRB5
             (!options.kerberos_authentication || options.kerberos_or_local_passwd) &&              (!options.kerberos_authentication || options.kerberos_or_local_passwd) &&
 #endif  #endif
             PRIVSEP(auth_password(authctxt, ""))) {              PRIVSEP(auth_password(authctxt, ""))) {
Line 106 
Line 106 
                 /* Process the packet. */                  /* Process the packet. */
                 switch (type) {                  switch (type) {
   
 #if defined(KRB4) || defined(KRB5)  #ifdef KRB5
                 case SSH_CMSG_AUTH_KERBEROS:                  case SSH_CMSG_AUTH_KERBEROS:
                         if (!options.kerberos_authentication) {                          if (!options.kerberos_authentication) {
                                 verbose("Kerberos authentication disabled.");                                  verbose("Kerberos authentication disabled.");
Line 114 
Line 114 
                                 char *kdata = packet_get_string(&dlen);                                  char *kdata = packet_get_string(&dlen);
                                 packet_check_eom();                                  packet_check_eom();
   
                                 if (kdata[0] == 4) { /* KRB_PROT_VERSION */                                  if (kdata[0] != 4) { /* KRB_PROT_VERSION */
 #ifdef KRB4  
                                         KTEXT_ST tkt, reply;  
                                         tkt.length = dlen;  
                                         if (tkt.length < MAX_KTXT_LEN)  
                                                 memcpy(tkt.dat, kdata, tkt.length);  
   
                                         if (PRIVSEP(auth_krb4(authctxt, &tkt,  
                                             &client_user, &reply))) {  
                                                 authenticated = 1;  
                                                 snprintf(info, sizeof(info),  
                                                     " tktuser %.100s",  
                                                     client_user);  
   
                                                 packet_start(  
                                                     SSH_SMSG_AUTH_KERBEROS_RESPONSE);  
                                                 packet_put_string((char *)  
                                                     reply.dat, reply.length);  
                                                 packet_send();  
                                                 packet_write_wait();  
   
                                                 xfree(client_user);  
                                         }  
 #endif /* KRB4 */  
                                 } else {  
 #ifdef KRB5  
                                         krb5_data tkt, reply;                                          krb5_data tkt, reply;
                                         tkt.length = dlen;                                          tkt.length = dlen;
                                         tkt.data = kdata;                                          tkt.data = kdata;
Line 163 
Line 138 
                                                         xfree(reply.data);                                                          xfree(reply.data);
                                                 xfree(client_user);                                                  xfree(client_user);
                                         }                                          }
 #endif /* KRB5 */  
                                 }                                  }
                                 xfree(kdata);                                  xfree(kdata);
                         }                          }
                         break;                          break;
 #endif /* KRB4 || KRB5 */  
   
 #if defined(AFS) || defined(KRB5)  
                         /* XXX - punt on backward compatibility here. */  
                 case SSH_CMSG_HAVE_KERBEROS_TGT:                  case SSH_CMSG_HAVE_KERBEROS_TGT:
                         packet_send_debug("Kerberos TGT passing disabled before authentication.");                          packet_send_debug("Kerberos TGT passing disabled before authentication.");
                         break;                          break;
 #ifdef AFS  #endif
                 case SSH_CMSG_HAVE_AFS_TOKEN:  
                         packet_send_debug("AFS token passing disabled before authentication.");  
                         break;  
 #endif /* AFS */  
 #endif /* AFS || KRB5 */  
   
                 case SSH_CMSG_AUTH_RHOSTS:                  case SSH_CMSG_AUTH_RHOSTS:
                         if (!options.rhosts_authentication) {                          if (!options.rhosts_authentication) {

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49